From eea1cf1d2c9da15f9a573ef049090d2fa93c321b Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Thu, 2 May 2019 20:01:39 -0700 Subject: [PATCH] Schedule jobs using UTC to prevent tiggers in the past --- data/interfaces/default/queue_modal.html | 10 +++++----- data/interfaces/default/scheduler_table.html | 2 +- plexpy/__init__.py | 11 ++++++++--- plexpy/activity_handler.py | 10 ++++++---- plexpy/newsletter_handler.py | 9 +++++---- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/data/interfaces/default/queue_modal.html b/data/interfaces/default/queue_modal.html index dd97ccb3..91bead00 100644 --- a/data/interfaces/default/queue_modal.html +++ b/data/interfaces/default/queue_modal.html @@ -1,7 +1,7 @@ <% import datetime - from plexpy import helpers - from plexpy.activity_handler import ACTIVITY_SCHED, schedule_callback + import plexpy + from plexpy import activity_handler, helpers if queue == 'active sessions': filter_key = 'session_key-' @@ -14,7 +14,7 @@ title_key = title_format.format('Rating Key', 'Title') description = 'Queue to flush recently added items to the database and send notifications if enabled.' - scheduled_jobs = [j.id for j in ACTIVITY_SCHED.get_jobs() if j.id.startswith(filter_key)] + scheduled_jobs = [j.id for j in activity_handler.ACTIVITY_SCHED.get_jobs() if j.id.startswith(filter_key)] %>