selinon.dispatcher module

Selinon Dispatcher task implementation.

class selinon.dispatcher.Dispatcher[source]


Selinon Dispatcher worker implementation.

acks_late = True

Mark the whole flow as failed ignoring retry configuration.

Parameters:state – flow state that should be captured
Raises:celery.exceptions.Retry – Celery’s retry exception, always
ignore_result = False
max_retries = None

Perform migration of state first before proceeding.

Parameters:flow_info – information about the current flow
name = 'selinon.Dispatcher'
rate_limit = None
reject_on_worker_lost = None
request_stack = <celery.utils.threads._LocalStack object>
run(flow_name, node_args=None, parent=None, retried_count=None, retry=None, state=None, selective=False, migration_version=None)[source]

Dispatcher entry-point - run each time a dispatcher is scheduled.

  • flow_name – name of the flow
  • parent – flow parent nodes
  • node_args – arguments for workers
  • retried_count – number of Selinon retries done (not Celery retries)
  • retry – last retry countdown
  • state – the current system state
  • selective – selective flow information if run in selective flow
  • migration_version – migration version that was used for the flow


selinon_retry(flow_info, adjust_retried_count=True, keep_state=True)[source]

Retry whole flow on failure if configured so, forget any progress done so far.

  • flow_info (dict) – a dictionary holding all the information relevant to flow (dispatcher arguments)
  • adjust_retried_count (bool) – if true, retried count will be adjusted, could cause flow failure
  • keep_state (bool) – keep or discard the current progress of the flow

celery.Retry – always

serializer = 'json'
store_errors_even_if_ignored = False
track_started = True
typing = True