diff --git a/.gitignore b/.gitignore index 309288bc..da077e1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ local_settings.py local_sources.json +sources.txt +sources.tmp Vagrantfile @@ -53,7 +55,7 @@ local_dumps/ .idea *.swp *.swo -.vscode +.vscode/ # logs *.log diff --git a/bin/backend.sh b/bin/backend.sh index 2186a38b..4263ae88 100755 --- a/bin/backend.sh +++ b/bin/backend.sh @@ -4,11 +4,11 @@ cd /opt/ori find . -name "*.pyc" -exec rm -f {} celery flower --app=ocd_backend.app:celery_app & #celery worker --app=ocd_backend.app:celery_app --attach --pidfile=/var/run/celery/%n.pid --loglevel=info --concurrency=8 -celery multi start 4 -Q:1-2 default -Q slow -c8 -A ocd_backend.app:celery_app -l info --logfile=log/celery.log --pidfile=/var/run/celery/%n.pid +celery multi start 4 -Q transformers,enrichers -c8 -A ocd_backend.app:celery_app -l debug --logfile=log/celery.log --pidfile=/var/run/celery/%n.pid while true do inotifywait -e modify,attrib,close_write,move,delete -r /opt/ori/ocd_backend \ && date \ - && celery multi restart 4 -Q:1-2 default -Q slow -c8 -A ocd_backend.app:celery_app -l info --logfile=log/celery.log --pidfile=/var/run/celery/%n.pid + && celery multi restart 4 -Q transformers,enrichers -c8 -A ocd_backend.app:celery_app -l debug --logfile=log/celery.log --pidfile=/var/run/celery/%n.pid sleep 10 done diff --git a/deployment/cronjobs/production b/deployment/cronjobs/production new file mode 100644 index 00000000..a8d6e6de --- /dev/null +++ b/deployment/cronjobs/production @@ -0,0 +1,9 @@ +27 11,23 * * * sudo docker exec docker_c-certbot_1 certbot renew; cd /home/projects/nginx-load-balancer/docker && sudo ./reload.sh + + + +1 0 * * * cd /home/projects/open-raadsinformatie && docker-compose restart backend loader +5 0 * * * cd /home/projects/open-raadsinformatie && ./bin/update.sh +*/2 0-12 * * * cd /home/projects/open-raadsinformatie && ./bin/update_source.sh +5 8 15 * * docker exec ori_backend_1 ./manage.py elasticsearch monthly_check --token=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y +#23 14 * * * cd /home/breyten/load && ./start.sh