mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Bump apscheduler from 3.10.1 to 3.10.4 (#2133)
* Bump apscheduler from 3.10.1 to 3.10.4 Bumps [apscheduler](https://github.com/agronholm/apscheduler) from 3.10.1 to 3.10.4. - [Changelog](https://github.com/agronholm/apscheduler/blob/3.10.4/docs/versionhistory.rst) - [Commits](https://github.com/agronholm/apscheduler/compare/3.10.1...3.10.4) --- updated-dependencies: - dependency-name: apscheduler dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update apscheduler==3.10.4 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
3debeada2a
commit
2c42150799
11 changed files with 855 additions and 825 deletions
|
@ -7,7 +7,6 @@ from logging import getLogger
|
|||
import warnings
|
||||
import sys
|
||||
|
||||
from pkg_resources import iter_entry_points
|
||||
from tzlocal import get_localzone
|
||||
import six
|
||||
|
||||
|
@ -31,6 +30,11 @@ try:
|
|||
except ImportError:
|
||||
from collections import MutableMapping
|
||||
|
||||
try:
|
||||
from importlib.metadata import entry_points
|
||||
except ModuleNotFoundError:
|
||||
from importlib_metadata import entry_points
|
||||
|
||||
#: constant indicating a scheduler's stopped state
|
||||
STATE_STOPPED = 0
|
||||
#: constant indicating a scheduler's running state (started and processing jobs)
|
||||
|
@ -62,12 +66,18 @@ class BaseScheduler(six.with_metaclass(ABCMeta)):
|
|||
|
||||
.. seealso:: :ref:`scheduler-config`
|
||||
"""
|
||||
# The `group=...` API is only available in the backport, used in <=3.7, and in std>=3.10.
|
||||
if (3, 8) <= sys.version_info < (3, 10):
|
||||
_trigger_plugins = {ep.name: ep for ep in entry_points()['apscheduler.triggers']}
|
||||
_executor_plugins = {ep.name: ep for ep in entry_points()['apscheduler.executors']}
|
||||
_jobstore_plugins = {ep.name: ep for ep in entry_points()['apscheduler.jobstores']}
|
||||
else:
|
||||
_trigger_plugins = {ep.name: ep for ep in entry_points(group='apscheduler.triggers')}
|
||||
_executor_plugins = {ep.name: ep for ep in entry_points(group='apscheduler.executors')}
|
||||
_jobstore_plugins = {ep.name: ep for ep in entry_points(group='apscheduler.jobstores')}
|
||||
|
||||
_trigger_plugins = dict((ep.name, ep) for ep in iter_entry_points('apscheduler.triggers'))
|
||||
_trigger_classes = {}
|
||||
_executor_plugins = dict((ep.name, ep) for ep in iter_entry_points('apscheduler.executors'))
|
||||
_executor_classes = {}
|
||||
_jobstore_plugins = dict((ep.name, ep) for ep in iter_entry_points('apscheduler.jobstores'))
|
||||
_jobstore_classes = {}
|
||||
|
||||
#
|
||||
|
@ -1019,6 +1029,7 @@ class BaseScheduler(six.with_metaclass(ABCMeta)):
|
|||
wait_seconds = None
|
||||
self._logger.debug('No jobs; waiting until a job is added')
|
||||
else:
|
||||
now = datetime.now(self.timezone)
|
||||
wait_seconds = min(max(timedelta_seconds(next_wakeup_time - now), 0), TIMEOUT_MAX)
|
||||
self._logger.debug('Next wakeup is due at %s (in %f seconds)', next_wakeup_time,
|
||||
wait_seconds)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue