/opt/imh-python/lib/python3.9/site-packages/apscheduler/schedulers
NameSizeModeActions
__pycache__/-0755rm
asyncio.py18930644editdlrm
background.py14760644editdlrm
base.py483420644editdlrm
blocking.py8720644editdlrm
gevent.py9870644editdlrm
qt.py12410644editdlrm
tornado.py18900644editdlrm
twisted.py17780644editdlrm
__init__.py4060644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/apscheduler/schedulers/background.py (1476B)
from threading import Event, Thread from apscheduler.schedulers.base import BaseScheduler from apscheduler.schedulers.blocking import BlockingScheduler from apscheduler.util import asbool class BackgroundScheduler(BlockingScheduler): """ A scheduler that runs in the background using a separate thread (:meth:`~apscheduler.schedulers.base.BaseScheduler.start` will return immediately). Extra options: ========== ============================================================================= ``daemon`` Set the ``daemon`` option in the background thread (defaults to ``True``, see `the documentation `_ for further details) ========== ============================================================================= """ _thread = None def _configure(self, config): self._daemon = asbool(config.pop("daemon", True)) super()._configure(config) def start(self, *args, **kwargs): if self._event is None or self._event.is_set(): self._event = Event() BaseScheduler.start(self, *args, **kwargs) self._thread = Thread( target=self._main_loop, name="APScheduler", daemon=self._daemon ) self._thread.start() def shutdown(self, *args, **kwargs): super().shutdown(*args, **kwargs) self._thread.join() del self._thread