workflow.database package
Subpackages
- workflow.database.report package
- Submodules
- workflow.database.report.models module
DataRun
DataRun.DoesNotExist
DataRun.MultipleObjectsReturned
DataRun.create_and_save()
DataRun.created_on
DataRun.file
DataRun.get_next_by_created_on()
DataRun.get_previous_by_created_on()
DataRun.id
DataRun.instrument_id
DataRun.instrument_id_id
DataRun.instrumentstatus_set
DataRun.ipts_id
DataRun.ipts_id_id
DataRun.is_complete()
DataRun.json_encode()
DataRun.last_error()
DataRun.objects
DataRun.run_number
DataRun.runstatus_set
DataRun.workflowsummary_set
DataRunManager
Error
IPTS
IPTSManager
Information
Instrument
Instrument.DoesNotExist
Instrument.MultipleObjectsReturned
Instrument.activeinstrument_set
Instrument.choice_set
Instrument.datarun_set
Instrument.id
Instrument.instrumentstatus_set
Instrument.legacyurl_set
Instrument.monitoredvariable_set
Instrument.name
Instrument.number_of_expts()
Instrument.number_of_runs()
Instrument.objects
Instrument.pv_set
Instrument.pvcache_set
Instrument.pvstring_set
Instrument.pvstringcache_set
Instrument.reductionproperty_set
Instrument.signal_set
Instrument.statuscache_set
Instrument.statusvariable_set
Instrument.task_set
InstrumentManager
InstrumentStatus
RunStatus
RunStatus.DoesNotExist
RunStatus.MultipleObjectsReturned
RunStatus.created_on
RunStatus.error_set
RunStatus.get_next_by_created_on()
RunStatus.get_previous_by_created_on()
RunStatus.has_errors()
RunStatus.id
RunStatus.information_set
RunStatus.last_error()
RunStatus.last_info()
RunStatus.message_id
RunStatus.objects
RunStatus.queue_id
RunStatus.queue_id_id
RunStatus.run_id
RunStatus.run_id_id
RunStatusManager
StatusQueue
Task
TaskManager
WorkflowSummary
WorkflowSummary.DoesNotExist
WorkflowSummary.MultipleObjectsReturned
WorkflowSummary.catalog_started
WorkflowSummary.cataloged
WorkflowSummary.complete
WorkflowSummary.id
WorkflowSummary.objects
WorkflowSummary.reduced
WorkflowSummary.reduction_catalog_started
WorkflowSummary.reduction_cataloged
WorkflowSummary.reduction_needed
WorkflowSummary.reduction_started
WorkflowSummary.run_id
WorkflowSummary.run_id_id
WorkflowSummary.update()
WorkflowSummaryManager
- Module contents
Submodules
workflow.database.manage module
workflow.database.transactions module
Perform DB transactions
- workflow.database.transactions.add_status_entry(headers, data)[source]
Populate the reporting database with the contents of a status message of the following format:
- headers: {‘expires’: ‘0’, ‘timestamp’: ‘1344613053723’,
‘destination’: ‘/queue/POSTPROCESS.DATA_READY’, ‘persistent’: ‘true’, ‘priority’: ‘5’, ‘message-id’: ‘ID:mac83086.ornl.gov-59780-1344536680877-8:2:1:1:1’}
The data is a dictionary in a JSON format.
- data: {“instrument”: tokens[2],
“ipts”: tokens[3], “run_number”: run_number, “data_file”: message}
- Parameters:
headers – ActiveMQ message header dictionary
data – JSON encoded message content
- workflow.database.transactions.add_task(instrument, input_queue, task_class='', task_queues=None, success_queues=None)[source]
Add a task entry
- workflow.database.transactions.add_workflow_status_entry(destination, message)[source]
Add a database entry for an event generated by the workflow manager. This represents additional information regarding interventions by the workflow manager.
- Parameters:
destination – string representing the StatusQueue
message – JSON encoded data dictionary
- workflow.database.transactions.get_message_queues(only_workflow_inputs=True)[source]
Get the list of message queues from the DB
- Parameters:
only_workflow_inputs – if True, only the queues that the workflow manager listens to will be returned