Further error catching

This commit is contained in:
Oliver Walters 2022-01-07 17:20:57 +11:00
parent 103dfaa2a5
commit 668e2bfcd5
2 changed files with 3 additions and 3 deletions

View File

@ -154,7 +154,7 @@ class ScheduleMixin:
minutes=task.get('minutes', None),
repeats=task.get('repeats', -1),
)
except OperationalError:
except (ProgrammingError, OperationalError):
# Database might not yet be ready
pass
@ -175,7 +175,7 @@ class ScheduleMixin:
scheduled_task.delete()
except Schedule.DoesNotExist:
pass
except OperationalError:
except (ProgrammingError, OperationalError):
# Database might not yet be ready
pass

View File

@ -336,7 +336,7 @@ class PluginsRegistry:
if deleted_count > 0:
logger.info(f"Removed {deleted_count} old scheduled tasks")
except OperationalError:
except (ProgrammingError, OperationalError):
# Database might not yet be ready
pass