Browse Source

Acrescenta job importação Gescon

pull/159/head
Sesostris Vieira 2 years ago
parent
commit
2f9b382c65
  1. 0
      sigi/apps/convenios/jobs/__init__.py
  2. 0
      sigi/apps/convenios/jobs/daily/__init__.py
  3. 15
      sigi/apps/convenios/jobs/daily/importa_gescon.py
  4. 0
      sigi/apps/convenios/jobs/hourly/__init__.py
  5. 0
      sigi/apps/convenios/jobs/monthly/__init__.py
  6. 0
      sigi/apps/convenios/jobs/weekly/__init__.py
  7. 0
      sigi/apps/convenios/jobs/yearly/__init__.py

0
sigi/apps/convenios/jobs/__init__.py

0
sigi/apps/convenios/jobs/daily/__init__.py

15
sigi/apps/convenios/jobs/daily/importa_gescon.py

@ -0,0 +1,15 @@
from django_extensions.management.jobs import DailyJob
from sigi.apps.convenios.models import Gescon
import datetime
class Job(DailyJob):
help = "Carga de dados do Gescon."
def execute(self):
now = datetime.datetime.now()
print(f"Import gescon data started at {now:%Y-%m-%d %H:%M:%S}")
gescon = Gescon.load()
gescon.importa_contratos()
now = datetime.datetime.now()
print(f"Import gescon data finished at {now:%Y-%m-%d %H:%M:%S}")

0
sigi/apps/convenios/jobs/hourly/__init__.py

0
sigi/apps/convenios/jobs/monthly/__init__.py

0
sigi/apps/convenios/jobs/weekly/__init__.py

0
sigi/apps/convenios/jobs/yearly/__init__.py

Loading…
Cancel
Save