diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2014-05-28 06:34:21 +0300 |
---|---|---|
committer | Alex Grönholm <alex.gronholm@nextday.fi> | 2014-05-28 06:34:21 +0300 |
commit | c987a5fa48a3f59c68256db3599be6586b5bd866 (patch) | |
tree | 4754d23ba07ecb59f521ab62f9388529bc8f2962 | |
parent | 05bab82b518f0e3d3b4c2c000e149375b6d8681a (diff) | |
download | apscheduler-c987a5fa48a3f59c68256db3599be6586b5bd866.tar.gz |
Added API documentation for apscheduler.events
-rw-r--r-- | apscheduler/events.py | 20 | ||||
-rw-r--r-- | docs/modules/events.rst | 50 |
2 files changed, 58 insertions, 12 deletions
diff --git a/apscheduler/events.py b/apscheduler/events.py index b177f07..135f814 100644 --- a/apscheduler/events.py +++ b/apscheduler/events.py @@ -4,16 +4,16 @@ __all__ = ('EVENT_SCHEDULER_START', 'EVENT_SCHEDULER_SHUTDOWN', 'EVENT_JOBSTORE_ 'JobEvent') -EVENT_SCHEDULER_START = 1 # The scheduler was started -EVENT_SCHEDULER_SHUTDOWN = 2 # The scheduler was shut down -EVENT_JOBSTORE_ADDED = 4 # A job store was added to the scheduler -EVENT_JOBSTORE_REMOVED = 8 # A job store was removed from the scheduler -EVENT_JOBSTORE_JOB_ADDED = 16 # A job was added to a job store -EVENT_JOBSTORE_JOB_REMOVED = 32 # A job was removed from a job store -EVENT_JOBSTORE_JOB_MODIFIED = 64 # A job was modified from outside the scheduler -EVENT_JOB_EXECUTED = 128 # A job was executed successfully -EVENT_JOB_ERROR = 256 # A job raised an exception during execution -EVENT_JOB_MISSED = 512 # A job's execution was missed +EVENT_SCHEDULER_START = 1 +EVENT_SCHEDULER_SHUTDOWN = 2 +EVENT_JOBSTORE_ADDED = 4 +EVENT_JOBSTORE_REMOVED = 8 +EVENT_JOBSTORE_JOB_ADDED = 16 +EVENT_JOBSTORE_JOB_REMOVED = 32 +EVENT_JOBSTORE_JOB_MODIFIED = 64 +EVENT_JOB_EXECUTED = 128 +EVENT_JOB_ERROR = 256 +EVENT_JOB_MISSED = 512 EVENT_ALL = (EVENT_SCHEDULER_START | EVENT_SCHEDULER_SHUTDOWN | EVENT_JOBSTORE_ADDED | EVENT_JOBSTORE_REMOVED | EVENT_JOBSTORE_JOB_ADDED | EVENT_JOBSTORE_JOB_REMOVED | EVENT_JOBSTORE_JOB_MODIFIED | EVENT_JOB_EXECUTED | EVENT_JOB_ERROR | EVENT_JOB_MISSED) diff --git a/docs/modules/events.rst b/docs/modules/events.rst index 2506156..a33fafb 100644 --- a/docs/modules/events.rst +++ b/docs/modules/events.rst @@ -3,8 +3,8 @@ .. automodule:: apscheduler.events -Module Contents ---------------- +API +--- .. autoclass:: SchedulerEvent :members: @@ -14,3 +14,49 @@ Module Contents .. autoclass:: JobEvent :members: + + +Event codes +----------- + +The following event codes are numeric constants importable from :mod:`apscheduler.events`. + +.. list-table:: + :header-rows: 1 + + * - Constant + - Description + - Event class + * - EVENT_SCHEDULER_START + - The scheduler was started + - :class:`SchedulerEvent` + * - EVENT_SCHEDULER_SHUTDOWN + - The scheduler was shut down + - :class:`SchedulerEvent` + * - EVENT_JOBSTORE_ADDED + - A job store was added to the scheduler + - :class:`JobStoreEvent` + * - EVENT_JOBSTORE_REMOVED + - A job store was removed from the scheduler + - :class:`JobStoreEvent` + * - EVENT_JOBSTORE_JOB_ADDED + - A job was added to a job store + - :class:`JobStoreEvent` + * - EVENT_JOBSTORE_JOB_REMOVED + - A job was removed from a job store + - :class:`JobStoreEvent` + * - EVENT_JOBSTORE_JOB_MODIFIED + - A job was modified from outside the scheduler + - :class:`JobStoreEvent` + * - EVENT_JOB_EXECUTED + - A job was executed successfully + - :class:`JobEvent` + * - EVENT_JOB_ERROR + - A job raised an exception during execution + - :class:`JobEvent` + * - EVENT_JOB_MISSED + - A job's execution was missed + - :class:`JobEvent` + * - EVENT_ALL + - A catch-all mask that includes every event type + - N/A |