add print and dev variable

This commit is contained in:
2024-10-31 07:50:02 +01:00
parent 9c0d33214d
commit 4b8bea7f2e
2 changed files with 4 additions and 3 deletions

View File

@@ -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):

View File

@@ -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")