Browse Source

Muda job importa_gescon para 4/4 horas

pull/163/head
Sesostris Vieira 2 years ago
parent
commit
9b5ffd2cdc
  1. 1
      docker/Dockerfile
  2. 5
      sigi/apps/convenios/jobs/importa_gescon.py

1
docker/Dockerfile

@ -93,6 +93,7 @@ RUN mkdir -p /var/log/sigi
# schedule cron jobs
RUN crontab -l | { cat; echo "* * * * * /usr/local/bin/python ${HOME}/manage.py runjobs minutely >> /var/log/sigi/cron.log 2>&1"; } | crontab -
RUN crontab -l | { cat; echo "0 * * * * /usr/local/bin/python ${HOME}/manage.py runjobs hourly >> /var/log/sigi/cron.log 2>&1"; } | crontab -
RUN crontab -l | { cat; echo "0 0/4 * * * /usr/local/bin/python ${HOME}/manage.py runjob importa_gescon >> /var/log/sigi/cron.log 2>&1"; } | crontab -
RUN crontab -l | { cat; echo "0 0 * * * /usr/local/bin/python ${HOME}/manage.py runjobs daily >> /var/log/sigi/cron.log 2>&1"; } | crontab -
RUN crontab -l | { cat; echo "0 0 * * 0 /usr/local/bin/python ${HOME}/manage.py runjobs weekly >> /var/log/sigi/cron.log 2>&1"; } | crontab -
RUN crontab -l | { cat; echo "0 0 1 * * /usr/local/bin/python ${HOME}/manage.py runjobs monthly >> /var/log/sigi/cron.log 2>&1"; } | crontab -

5
sigi/apps/convenios/jobs/daily/importa_gescon.py → sigi/apps/convenios/jobs/importa_gescon.py

@ -2,12 +2,11 @@ import datetime
import docutils.core
from django.core.mail import mail_admins
from django.utils.translation import gettext as _
from django_extensions.management.jobs import DailyJob
from sigi.apps.convenios.models import Gescon
from sigi.apps.utils.management.jobs import JobReportMixin
from sigi.apps.utils.management.jobs import JobReportMixin, QuarterDailyJob
class Job(JobReportMixin, DailyJob):
class Job(JobReportMixin, QuarterDailyJob):
help = "Carga de dados do Gescon."
def do_job(self):
Loading…
Cancel
Save