Skip to content

Commit

Permalink
example scheduler config
Browse files Browse the repository at this point in the history
  • Loading branch information
ngr committed May 6, 2019
1 parent 0ec4b1b commit c234251
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions docs/scheduler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,55 @@ configurable rules for chunking specific for different workers.
Scheduler Workflow


.. code-block:: python
TASKS_TABLE_CONFIG = {
'row_mapper': {
'task_id': 'S',
'labourer_id': 'S',
'greenfield': 'N',
'attempts': 'N',
'closed_at': 'N',
'completed_at': 'N',
'desired_launch_time': 'N',
'arn': 'S',
'payload': 'S'
},
'required_fields': ['task_id', 'labourer_id', 'created_at', 'greenfield'],
'table_name': 'sosw_tasks',
'index_greenfield': 'sosw_tasks_greenfield',
'field_names': {
'task_id': 'task_id',
'labourer_id': 'labourer_id',
'greenfield': 'greenfield',
}
}
TASK_CLIENT_CONFIG = {
'dynamo_db_config': TASKS_TABLE_CONFIG,
'sosw_closed_tasks_table': 'sosw_closed_tasks',
'sosw_retry_tasks_table': 'sosw_retry_tasks',
'sosw_retry_tasks_greenfield_index': 'labourer_id_greenfield',
'ecology_config': {},
'labourers': {
'some_function': {
'arn': 'arn:aws:lambda:us-west-2:0000000000:function:some_function',
'max_simultaneous_invocations': 10,
},
},
}
SCHEDULER_CONFIG = {
'queue_bucket': 'some-bucket',
'task_config': TASK_CLIENT_CONFIG,
'job_schema': {
'chunkable_attrs': [
]
}
}
.. automodule:: sosw.scheduler
:members:

0 comments on commit c234251

Please sign in to comment.