Skip to content
This repository was archived by the owner on Feb 10, 2021. It is now read-only.
This repository was archived by the owner on Feb 10, 2021. It is now read-only.

Closing all workers #92

Description

@jakirkham

In cases where there are lots of workers stop_workers is slow. This appears to be caused by closing each worker in a for-loop.

As the common case where multiple workers are submitted to be stopped is just submitting all workers to stop, it would be good to special case this and pass JOB_IDS_SESSION_ALL to DRMAA. This would bypass the need for the loop.

There are a few options:

  1. Detect if all workers were passed in (easy, maybe a little hacky)
  2. Make the worker_ids parameter optional and the default value equal to all workers (easy, straightforward)
  3. Integrate this into close (easy, hacky without 1 or 2)
  4. Background the task somehow using threads, dask.delayed, or similar (may need a few tricks depending)

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions