Commit 509aeaee authored by echel0n's avatar echel0n

Refactored error logging of failed queue tasks to include task name instead of just queue name

Fixed #SICKRAGE-APP-5GP - SchedulerNotRunningError apscheduler.schedulers.base in shutdown, Scheduler is not running
parent b26f805c
......@@ -33,6 +33,7 @@ from collections import deque
from urllib.parse import uses_netloc
from urllib.request import FancyURLopener
from apscheduler.schedulers import SchedulerNotRunningError
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.triggers.interval import IntervalTrigger
from dateutil import tz
......@@ -560,7 +561,10 @@ class Core(object):
# shutdown scheduler
if self.scheduler:
except SchedulerNotRunningError:
# shutdown webserver
if self.wserver:
......@@ -256,8 +256,8 @@ class Queue(object):
if task_id in self.tasks:"Removing {} task {}".format(, task_id))
task = self.tasks.get(task_id)
if task.status == TaskStatus.FAILED:"{} task {} failed: {}".format(, task_id, task.error_message))
if task.status == TaskStatus.FAILED and task.error_message:"{} task {} failed: {}".format(, task_id, task.error_message))
if task in self.queue:
del self.tasks[task_id]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment