Plugins¶
This package contains the various built-in plugins available for Chancy. Plugins are used to extend the functionality of Chancy, while allowing for significant customization.
Some Chancy plugins are enabled by default. You can pass your own into the
list of plugins to customize them or set no_default_plugins
to True
to
disable them completely:
async with Chancy(..., no_default_plugins=True, plugins=[]):
...
Default Plugins¶
chancy.plugins.workflow.WorkflowPlugin
: This plugin provides a workflow system for managing complex job dependencies.chancy.plugins.metrics.Metrics
: This plugin collects metrics about the performance of the Chancy cluster and makes them available to the API, dashboard, and database.chancy.plugins.leadership.Leadership
: This plugin is responsible for managing leadership elections between multiple workers. Most other plugins require this plugin to be enabled.chancy.plugins.pruner.Pruner
: This plugin is responsible for pruning old jobs from the database when they are no longer needed.chancy.plugins.recovery.Recovery
: This plugin is responsible for recovering jobs that were interrupted during execution, such as when a worker crashes or is restarted.
Optional Plugins¶
Chancy also comes with some additional plugins that can be enabled as needed, and typically require additional dependencies:
chancy.plugins.api.Api
: This plugin provides an API and dashboard for viewing the state of the Chancy cluster.chancy.plugins.cron.Cron
: This plugin is responsible for running jobs to at recurring schedules, such as “once an hour” or “every Monday”.chancy.plugins.retry.RetryPlugin
: This plugin provides a slightly more advanced job retry system with jitter, backoff, and other features.chancy.plugins.reprioritize.Reprioritize
: This plugin increases the priority of jobs based on how long they’ve been in the queue.chancy.plugins.sentry.SentryPlugin
: This plugin sends job exceptions to Sentry, along with metadata about the job and worker.
Submodules¶
- Leadership
- Pruner
- Recovery
- Cron
- API/Dashboard
- Workflows
WorkflowPlugin
WorkflowPlugin.Rules
WorkflowPlugin.api_plugin()
WorkflowPlugin.cleanup()
WorkflowPlugin.fetch_workflow()
WorkflowPlugin.fetch_workflow_ex()
WorkflowPlugin.fetch_workflows()
WorkflowPlugin.fetch_workflows_ex()
WorkflowPlugin.generate_dot()
WorkflowPlugin.get_dependencies()
WorkflowPlugin.get_identifier()
WorkflowPlugin.get_tables()
WorkflowPlugin.migrate_key()
WorkflowPlugin.migrate_package()
WorkflowPlugin.on_job_updated()
WorkflowPlugin.process_workflow()
WorkflowPlugin.push()
WorkflowPlugin.push_ex()
WorkflowPlugin.run()
WorkflowPlugin.wait_for_workflow()
Workflow
WorkflowStep
Sequence
WorkflowApiPlugin
- Retry
- Reprioritization
- Sentry
- Metrics
Metrics
Metrics.api_plugin()
Metrics.cleanup()
Metrics.get_identifier()
Metrics.get_metrics()
Metrics.get_tables()
Metrics.increment_counter()
Metrics.matches_prefix()
Metrics.migrate_key()
Metrics.migrate_package()
Metrics.on_job_updated()
Metrics.record_gauge()
Metrics.record_histogram_value()
Metrics.run()