Dispatcher#
Dispatching jobs to the server and stopping triggered dispatches
- covalent.dispatch(orig_lattice, dispatcher_addr=None, disable_run=False)#
Wrapping the dispatching functionality to allow input passing and server address specification.
Afterwards, send the lattice to the dispatcher server and return the assigned dispatch id.
- Parameters
orig_lattice (
Lattice
) – The lattice/workflow to send to the dispatcher server.dispatcher_addr (
Optional
[str
]) – The address of the dispatcher server. If None then defaults to the address set in Covalent’s config.disable_run (
bool
) – Whether to disable running the workflow and rather just save it on Covalent’s server for later execution
- Return type
Callable
- Returns
Wrapper function which takes the inputs of the workflow as arguments
- covalent.dispatch_sync(lattice, dispatcher_addr=None)#
Wrapping the synchronous dispatching functionality to allow input passing and server address specification.
Afterwards, sends the lattice to the dispatcher server and return the result of the executed workflow.
- Parameters
orig_lattice – The lattice/workflow to send to the dispatcher server.
dispatcher_addr (
Optional
[str
]) – The address of the dispatcher server. If None then defaults to the address set in Covalent’s config.
- Return type
Callable
- Returns
Wrapper function which takes the inputs of the workflow as arguments.
- covalent.redispatch(dispatch_id, dispatcher_addr=None, replace_electrons=None, reuse_previous_results=False, is_pending=False)#
Wrapping the dispatching functionality to allow input passing and server address specification.
- Parameters
dispatch_id (
str
) – The dispatch id of the workflow to re-dispatch.dispatcher_addr (
Optional
[str
]) – The address of the dispatcher server. If None then then defaults to the address set in Covalent’s config.replace_electrons (
Optional
[Dict
[str
,Callable
]]) – A dictionary of electron names and the new electron to replace them with.reuse_previous_results (
bool
) – Boolean value whether to reuse the results from the previous dispatch.
- Return type
Callable
- Returns
Wrapper function which takes the inputs of the workflow as arguments.
- covalent.stop_triggers(dispatch_ids, triggers_server_addr=None)#
Stop observing on all triggers of all given dispatch ids registered on the Triggers server. :type dispatch_ids:
Union
[str
,List
[str
]] :param dispatch_ids: Dispatch ID(s) for whose triggers are to be stopped :type triggers_server_addr:Optional
[str
] :param triggers_server_addr: Address of the Triggers server; configured dispatcher’s address is used as default- Return type
None
- Returns
None