Added
- `Result.CANCELLED` status to represent the status of a cancelled dispatch.
- Condition to cancel the whole dispatch if any of the nodes are cancelled.
- `cancel_workflow` function which uses a shared variable provided by Dask (`dask.distributed.Variable`) in a dask client to inform nodes to stop execution.
- Cancel function for dispatcher server API which will allow the server to terminate the dispatch.
- How to notebook for cancelling a dispatched job.
- Test to verify whether cancellation of dispatched jobs is working as expected.
- `cancel` function is available as `covalent.cancel`.
Changed
- In file `covalent/_shared_files/config.py` instead of using a variable to store and then return the config data, now directly returning the configuration.
- Using `fire_and_forget` to dispatch a job instead of a dictionary of Dask's `Future` objects so that we won't have to manage the lifecycle of those futures.
- The `test_run_dispatcher` test was changed to reflect that the dispatcher no longer uses a dictionary of future objects as it was not being utilized anywhere.
Removed
- `with dask_client` context was removed as the client created in `covalent_dispatcher/_core/__init__.py` is already being used even without the context. Furthermore, it creates issues when that context is exited which is unnecessary at the first place hence not needed to be resolved.