Adaptation sync caldav task

This commit is contained in:
Ambulance Clerc
2022-10-12 15:25:09 +02:00
parent 30a50f60f2
commit b2f0bbd96e
3 changed files with 14 additions and 14 deletions

Binary file not shown.

View File

@@ -155,7 +155,7 @@ class cls_caldav_client():
#self.get_events_by_date(self.a_team)
def init_task_management(self):
if datetime.today().day == 1 and datetime.today().hour == 1:
print("pass copy task process")
try:
with open(os.path.join("mycaldav", "last_sync_config.bin"), "rb") as file:
array = pickle.load(file)

View File

@@ -22,7 +22,7 @@ def view_task_caldav(request):
o_caldav.get_caldav_data()
template = loader.get_template("task/task.html")
context = {'latest_task_list':o_caldav.day, 'night_task_list': o_caldav.night}
if datetime.today().day == 1 and datetime.today().hour == 1:
if (datetime.today().day == 1) or 2==1:
myClient = cls_caldav_client()
myClient.init_task_management()
return HttpResponse(template.render(context,request))