- -
-

pyams_scheduler package

- -
-

Submodules

-
-
-

pyams_scheduler.include module

-
-
-pyams_scheduler.include.handle_new_application(event)
-

Start scheduler process when application is created

-
- -
-
-pyams_scheduler.include.include_package(config)
-

Pyramid package include

-
- -
-
-

pyams_scheduler.process module

-
-
-class pyams_scheduler.process.BaseTaskThread(process, settings)
-

Bases: threading.Thread

-
- -
-
-class pyams_scheduler.process.SchedulerHandler
-

Bases: object

-

Scheduler handler

-
-
-get_jobs(settings)
-
- -
-
-remove_task(settings)
-
- -
-
-reset_task(settings)
-
- -
-
-run_task(settings)
-
- -
-
-test(settings)
-
- -
- -
-
-class pyams_scheduler.process.SchedulerMessageHandler(process, stream, stop, handler=None, json_load=-1)
-

Bases: pyams_zmq.handler.ZMQMessageHandler

-

ØMQ scheduler messages handler

-
-
-handler
-

alias of SchedulerHandler

-
- -
- -
-
-class pyams_scheduler.process.SchedulerProcess(zmq_address, handler, registry)
-

Bases: pyams_zmq.process.ZMQProcess

-

ØMQ tasks scheduler process

-
-
-run()
-
- -
- -
-
-class pyams_scheduler.process.TaskRemoverThread(process, settings)
-

Bases: pyams_scheduler.process.BaseTaskThread

-

Task remover thread

-
-
-run()
-
- -
- -
-
-class pyams_scheduler.process.TaskResettingThread(process, settings)
-

Bases: pyams_scheduler.process.BaseTaskThread

-

Task resetting thread

-

Task reset is run in another thread, so that: -- other transactions applied on updated tasks are visible -- ØMQ request returns immediately to calling process

-
-
-run()
-
- -
- -
-
-class pyams_scheduler.process.TaskRunnerThread(process, settings)
-

Bases: pyams_scheduler.process.BaseTaskThread

-

Task immediate runner thread

-
-
-run()
-
- -
- -
-
-

pyams_scheduler.scheduler module

-
-
-class pyams_scheduler.scheduler.Scheduler
-

Bases: zope.container.folder.Folder

-

Scheduler utility

-
-
-get_jobs()
-
- -
-
-get_task(task_id)
-
- -
-
-history
-
- -
-
-internal_id
-
- -
-
-report_mailer
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-report_source
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-tasks
-
- -
-
-test_process()
-

Send test request to scheduler process

-
- -
-
-zodb_name
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
- -
-
-class pyams_scheduler.scheduler.SchedulerHandler
-

Bases: object

-

Scheduler handler utility

-

This is just a ‘marker’ utility which is used to mark nodes in a cluster -which should run the scheduler

-
- -
-
-

pyams_scheduler.site module

-
-
-class pyams_scheduler.site.SchedulerGenerationsChecker
-

Bases: object

-

Scheduler generations checker

-
-
-evolve(site, current=None)
-

Check for required utilities

-
- -
-
-generation = 1
-
- -
- -
-
-pyams_scheduler.site.handle_new_local_site(event)
-

Create a new scheduler when a site is created

-
- -
-
-

pyams_scheduler.ssh module

-
-
-class pyams_scheduler.ssh.SSHCallerTask
-

Bases: pyams_scheduler.task.Task

-

SSH caller task

-
-
-cmdline
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-hostname
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-password
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-port
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-private_key
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-run(report)
-
- -
-
-username
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
- -
-
-

pyams_scheduler.task module

-
-
-class pyams_scheduler.task.ImmediateTaskTrigger
-

Bases: apscheduler.triggers.base.BaseTrigger

-

Immediate-style task scheduler

-
-
-get_next_fire_time(previous_fire_time, now)
-
- -
- -
-
-class pyams_scheduler.task.Task
-

Bases: persistent.Persistent, zope.container.contained.Contained

-

Task definition persistent class

-
-
-check_history()
-
- -
-
-errors_target
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-get_scheduling_info(registry)
-
- -
-
-get_trigger(registry)
-
- -
-
-history_duration
-
- -
-
-history_length
-
- -
-
-internal_id
-
- -
-
-is_runnable(registry)
-
- -
-
-keep_empty_reports
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-launch()
-
- -
-
-name
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-report_errors_only
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-report_target
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-reset()
-
- -
-
-run(report)
-
- -
-
-schedule_mode
-
- -
-
-send_empty_reports
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-send_report(report, status, registry)
-
- -
-
-settings_view_name
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-store_report(report, status)
-
- -
- -
-
-class pyams_scheduler.task.TaskHistoryContainer
-

Bases: zope.container.folder.Folder

-

Task history container

-
-
-check_history(duration, length)
-
- -
- -
-
-class pyams_scheduler.task.TaskHistoryItem(**kwargs)
-

Bases: persistent.Persistent, zope.container.contained.Contained

-

Task history item

-
-
-date
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-report
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-status
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
- -
-
-pyams_scheduler.task.handle_modified_task(event)
-

Handle modified task

-
- -
-
-pyams_scheduler.task.handle_new_task(event)
-

Handle new task

-
- -
-
-pyams_scheduler.task.handle_removed_task(event)
-

Handle removed task

-
- -
-
-

pyams_scheduler.trigger module

-
-
-class pyams_scheduler.trigger.CronTaskScheduleInfo
-

Bases: persistent.Persistent

-

Cron-style schedule info

-
-
-active
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-day
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-day_of_week
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-end_date
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-hour
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-minute
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-month
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-second
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-start_date
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-week
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-year
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
- -
-
-class pyams_scheduler.trigger.CronTaskScheduler
-

Bases: object

-

Cron-style scheduler mode

-
-
-get_trigger(task)
-
- -
-
-marker_interface = <InterfaceClass pyams_scheduler.interfaces.ICronTask>
-
- -
-
-schema = <InterfaceClass pyams_scheduler.interfaces.ICronTaskScheduling>
-
- -
- -
-
-pyams_scheduler.trigger.CronTaskSchedulerInfoFactory(context)
-

Cron-style task scheduling info factory

-
- -
-
-class pyams_scheduler.trigger.DateTaskScheduleInfo
-

Bases: persistent.Persistent

-

Date-style schedule info

-
-
-active
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-start_date
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
- -
-
-class pyams_scheduler.trigger.DateTaskScheduler
-

Bases: object

-

Date-style scheduler mode

-
-
-get_trigger(task)
-
- -
-
-marker_interface = <InterfaceClass pyams_scheduler.interfaces.IDateTask>
-
- -
-
-schema = <InterfaceClass pyams_scheduler.interfaces.IDateTaskScheduling>
-
- -
- -
-
-pyams_scheduler.trigger.DateTaskSchedulerInfoFactory(context)
-

Date-style task scheduling info factory

-
- -
-
-class pyams_scheduler.trigger.LoopTaskScheduleInfo
-

Bases: persistent.Persistent

-

Loop-style schedule info

-
-
-active
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-days
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-end_date
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-hours
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-minutes
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-seconds
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-start_date
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-weeks
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
- -
-
-class pyams_scheduler.trigger.LoopTaskScheduler
-

Bases: object

-

Loop-style scheduler mode

-
-
-get_trigger(task)
-
- -
-
-marker_interface = <InterfaceClass pyams_scheduler.interfaces.ILoopTask>
-
- -
-
-schema = <InterfaceClass pyams_scheduler.interfaces.ILoopTaskScheduling>
-
- -
- -
-
-pyams_scheduler.trigger.LoopTaskSchedulerInfoFactory(context)
-

Loop-style task scheduling info factory

-
- -
-
-class pyams_scheduler.trigger.SchedulingModesVocabulary(context, **kw)
-

Bases: zope.componentvocabulary.vocabulary.UtilityVocabulary

-

Scheduling modes vocabulary

-
-
-interface = <InterfaceClass pyams_scheduler.interfaces.ITaskSchedulingMode>
-
- -
-
-nameOnly = True
-
- -
- -
-
-

pyams_scheduler.url module

-
-
-class pyams_scheduler.url.URLCallerTask
-

Bases: pyams_scheduler.task.Task

-

URL caller task

-
-
-connection_timeout
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-password
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-proxy_password
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-proxy_port
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-proxy_server
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-proxy_username
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-remote_dns
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-run(report)
-
- -
-
-url
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-username
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
- -
-
-

pyams_scheduler.zodb module

-
-
-class pyams_scheduler.zodb.ZODBPackingTask
-

Bases: pyams_scheduler.task.Task

-

ZODB packing task

-
-
-pack_time
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
-
-run(report)
-
- -
-
-zeo_connection
-

Computed attributes based on schema fields

-

Field properties provide default values, data validation and error messages -based on data found in field meta-data.

-

Note that FieldProperties cannot be used with slots. They can only -be used for attributes stored in instance dictionaries.

-
- -
- -
-
-

Module contents

-
-
-pyams_scheduler.includeme(config)
-

Pyramid include

-

Split in another package to remove cyclic dependencies with TranslationStringFactory

-
- -
-
- - -