debug cron
This commit is contained in:
@@ -39,8 +39,9 @@ class caldav_sync_manager(models.Model):
|
||||
|
||||
self.a_task = data.calendar(cal_id=caldav_id["task"])
|
||||
|
||||
def set_today_as_synced(self):
|
||||
o_new_manager = caldav_sync_manager()
|
||||
def set_today_as_synced(self, date):
|
||||
o_new_manager = caldav_sync_manager()
|
||||
o_new_manager.dtDate = date
|
||||
o_new_manager.save()
|
||||
|
||||
def init_task_management(self):
|
||||
@@ -57,12 +58,7 @@ class caldav_sync_manager(models.Model):
|
||||
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)
|
||||
o_new_manager = caldav_sync_manager()
|
||||
o_new_manager.dtDate = last_month
|
||||
o_new_manager.save()
|
||||
o_new_manager.dtDate = last_month
|
||||
o_new_manager.save()
|
||||
self.copy_caldav_data(last_month)
|
||||
print(f"synced events")
|
||||
else:
|
||||
print("Mois précédant: pas de copy, sync déjà fait")
|
||||
@@ -101,7 +97,7 @@ class caldav_sync_manager(models.Model):
|
||||
summary= _title,
|
||||
description= _desc,
|
||||
)
|
||||
self.set_today_as_synced()
|
||||
self.set_today_as_synced(today)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user