add print and dev variable
This commit is contained in:
@@ -8,6 +8,7 @@ class InitTaskSync(CronJobBase):
|
||||
RUN_EVERY_MIN = 1
|
||||
|
||||
schedule = Schedule(run_at_times=RUN_AT_TIMES,)
|
||||
#schedule = Schedule(run_every_mins=RUN_EVERY_MIN,)
|
||||
code = 'reskreen.init_sync_task' # Un code unique pour votre tâche cron
|
||||
|
||||
def do(self):
|
||||
|
@@ -51,16 +51,16 @@ class caldav_sync_manager(models.Model):
|
||||
self.copy_caldav_data(today)
|
||||
print(f"synced events")
|
||||
else:
|
||||
print("pas de copy, sync déjà fait")
|
||||
print("Aujourd'hui: pas de copy, sync déjà fait")
|
||||
|
||||
last_month = today - relativedelta(months=1)
|
||||
print(f"test du mois précédant: {last_month.date}")
|
||||
print(f"test du mois précédant: {last_month.strftime("%d/%m/%Y")}")
|
||||
o_caldav_sync_management = caldav_sync_manager.objects.filter(dtDate=last_month.date())
|
||||
if not o_caldav_sync_management.exists():
|
||||
self.copy_caldav_data(last_month)
|
||||
print(f"synced events")
|
||||
else:
|
||||
print("pas de copy, sync déjà fait")
|
||||
print("Mois précédant: pas de copy, sync déjà fait")
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user