ample.util.worker module

Worker functions for job execution

worker(inqueue, early_terminate=False, check_success=None)[source]

Worker process to run MrBump jobs until no more left.

This function keeps looping over the inqueue, removing jobs from the inqueue until there are no more left. It checks if a jobs has succeeded and if so it will terminate.

Parameters:
  • inqueue (Queue) – A Python Queue object
  • early_terminate (bool) – Terminate on first success or continue running
  • check_success (callable) – A callable to check the success status of a job

Warning

This needs to import the main module that it lives in so maybe this should live in a separate module?