Skip to content
Snippets Groups Projects
Commit 9527fbb2 authored by jan.bednarik's avatar jan.bednarik
Browse files

calendar utils: Handle calendar sync fails

parent e86ca22b
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,13 @@ class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write("Updating calendars...")
for cal in Calendar.objects.all():
self.stdout.write(f"+ {cal.url}")
cal.update_source()
self.stdout.write(f"@ {cal.url}")
try:
cal.update_source()
self.stdout.write("+ ok")
except Exception as e:
# TODO logging
self.stdout.write("- failed")
self.stderr.write(e)
self.stdout.write("Updating calendars finished!")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment