mirror of https://github.com/interlegis/sigi.git
Sesostris Vieira
2 years ago
7 changed files with 15 additions and 0 deletions
@ -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}") |
Loading…
Reference in new issue