taran.foreman

Foreman([configuration]) A template for all decision processors.

The Foreman class - An abstraction of the AWS SWF Decider operations

class taran.foreman.Decision(name, type, schedule_to_start_timeout, start_to_close_timeout, schedule_to_close_timeout, task_list, input)
__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__getstate__()

Exclude the OrderedDict from pickling

__repr__()

Return a nicely formatted representation string

input

Alias for field number 6

name

Alias for field number 0

schedule_to_close_timeout

Alias for field number 4

schedule_to_start_timeout

Alias for field number 2

start_to_close_timeout

Alias for field number 3

task_list

Alias for field number 5

type

Alias for field number 1

class taran.foreman.Foreman(configuration=None)[source]

A template for all decision processors.

configuration

module

The configuration a foreman needs in order to participate in the workflow.

get_activity_results(activity=None)[source]

Get the result returned when the activity became completed.

get_workflow_history()[source]

Get entire workflow history.

Returns:a dict containing the entire workflow execution history
poll_for_decision_task()[source]

Poll for an decision task from SWF and return if a task token has been provided.

Returns:task – Details of the assigned task.
Return type:dict
schedule_activity_tasks(decisions=None)[source]

Retrieve the workflow history.

Args:
decisions (List): A list of dictionaries containing details of the activities to schedule.
Parameters:decisions (list) –