timApp.celery_sqlalchemy_scheduler package
Contents
timApp.celery_sqlalchemy_scheduler package#
Submodules#
timApp.celery_sqlalchemy_scheduler.models module#
- class timApp.celery_sqlalchemy_scheduler.models.CrontabSchedule(**kwargs)[source]#
Bases:
sqlalchemy.ext.declarative.api.Model
,timApp.celery_sqlalchemy_scheduler.models.ModelMixin
- day_of_month#
- day_of_week#
- hour#
- id#
- minute#
- month_of_year#
- property schedule#
- timezone#
- class timApp.celery_sqlalchemy_scheduler.models.IntervalSchedule(**kwargs)[source]#
Bases:
sqlalchemy.ext.declarative.api.Model
,timApp.celery_sqlalchemy_scheduler.models.ModelMixin
- DAYS = 'days'#
- HOURS = 'hours'#
- MICROSECONDS = 'microseconds'#
- MINUTES = 'minutes'#
- SECONDS = 'seconds'#
- every#
- id#
- period#
- property period_singular#
- property schedule#
- class timApp.celery_sqlalchemy_scheduler.models.PeriodicTask(**kwargs)[source]#
Bases:
sqlalchemy.ext.declarative.api.Model
,timApp.celery_sqlalchemy_scheduler.models.ModelMixin
- args#
- block#
- block_id#
- crontab#
- crontab_id#
- date_changed#
- description#
- enabled#
- exchange#
- expires#
- id#
- interval#
- interval_id#
- kwargs#
- last_run_at#
- name#
- no_changes = False#
- one_off#
- priority#
- queue#
- routing_key#
- property schedule#
- solar#
- solar_id#
- start_time#
- task#
- task_id#
Returns the TIM task id. Only valid for tasks added by users.
- property task_name#
- total_run_count#
- class timApp.celery_sqlalchemy_scheduler.models.PeriodicTaskChanged(**kwargs)[source]#
Bases:
sqlalchemy.ext.declarative.api.Model
,timApp.celery_sqlalchemy_scheduler.models.ModelMixin
Helper table for tracking updates to periodic tasks.
- classmethod changed(mapper, connection, target)[source]#
- Parameters
mapper – the Mapper which is the target of this event
connection – the Connection being used
target – the mapped instance being persisted
- id#
- last_update#
timApp.celery_sqlalchemy_scheduler.schedulers module#
- class timApp.celery_sqlalchemy_scheduler.schedulers.DatabaseScheduler(*args, **kwargs)[source]#
Bases:
celery.beat.Scheduler
- Changes#
alias of
timApp.celery_sqlalchemy_scheduler.models.PeriodicTaskChanged
- Entry#
alias of
timApp.celery_sqlalchemy_scheduler.schedulers.ModelEntry
- Model#
alias of
timApp.celery_sqlalchemy_scheduler.models.PeriodicTask
- property info#
override
- property schedule#
- class timApp.celery_sqlalchemy_scheduler.schedulers.ModelEntry(model, Session, app=None, **kw)[source]#
Bases:
celery.beat.ScheduleEntry
Scheduler entry taken from database row.
- classmethod from_entry(name, Session, app=None, **entry)[source]#
**entry sample:
- {‘task’: ‘celery.backend_cleanup’,
‘schedule’: schedules.crontab(‘0’, ‘4’, ‘*’), ‘options’: {‘expires’: 43200}}
- model_schedules = ((<class 'celery.schedules.crontab'>, <class 'timApp.celery_sqlalchemy_scheduler.models.CrontabSchedule'>, 'crontab'), (<class 'celery.schedules.schedule'>, <class 'timApp.celery_sqlalchemy_scheduler.models.IntervalSchedule'>, 'interval'), (<class 'celery.schedules.solar'>, <class 'timApp.celery_sqlalchemy_scheduler.models.SolarSchedule'>, 'solar'))#
- next()#
Return new instance, with date and count fields updated.
- save_fields = ['last_run_at', 'total_run_count', 'no_changes']#
timApp.celery_sqlalchemy_scheduler.session module#
SQLAlchemy session.
timApp.celery_sqlalchemy_scheduler.tzcrontab module#
Timezone aware Cron schedule Implementation.
- class timApp.celery_sqlalchemy_scheduler.tzcrontab.TzAwareCrontab(minute='*', hour='*', day_of_week='*', day_of_month='*', month_of_year='*', tz=<UTC>, app=None)[source]#
Bases:
celery.schedules.crontab
Timezone Aware Crontab.