Coder Social home page Coder Social logo

notifications-antivirus's Introduction

notifications-antivirus

Reads jobs from a queue, using the supplied filename to fetch files from an S3 bucket, and ClamAV to scan them. Sends the scan status back by creating a new job to update the notification status.

Setting up

Docker container

This app uses dependencies that are difficult to install locally. In order to make local development easy, we run app commands through a Docker container. Run the following to set this up:

make bootstrap-with-docker

Because the container caches things like Python packages, you will need to run this again if you change things like "requirements.txt".

AWS credentials

To run the app you will need appropriate AWS credentials. See the Wiki for more details.

environment.sh

In the root directory of the application, run:

echo "
export NOTIFICATION_QUEUE_PREFIX='YOUR_OWN_PREFIX'
"> environment.sh

Things to change:

  • Replace YOUR_OWN_PREFIX with local_dev_<first name> (to match other apps).

To run the application

# install dependencies, etc.
make bootstrap

# run the web app
make run-flask-with-docker

# run the background tasks
make run-celery-with-docker

To test the application

# install dependencies, etc.
make bootstrap

make test-with-docker

If you need to run a specific command, such as a single test, you can use the run_with_docker.sh script. This is what test and other make rules use.

./scripts/run_with_docker.sh pytest tests/some_specific_test.py

Further documentation

notifications-antivirus's People

Contributors

allait avatar benthorner avatar blesseddev avatar c4seyla avatar corlettb avatar crystalpea avatar dependabot[bot] avatar idavidmcdonald avatar kentsanggds avatar klssmith avatar leohemsted avatar richardc0 avatar risicle avatar rjbaker avatar robbrazil avatar sakisv avatar samuelhwilliams avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.