Kitware / Remus

Remus is a remote mesh/model service framework.
Other
9 stars 9 forks source link

remus::Worker now can state if a job or worker needs to be terminated. #192

Closed robertmaynard closed 9 years ago

robertmaynard commented 9 years ago

@vibraphone @judajake

This changes the behavior of the Worker's pendingJobCount and takePendingJob which now will not include terminated jobs, but will only have valid jobs and terminate worker jobs.

The new approach to determine if the job you are running should be cancelled while you are processing it is to use Worker:: jobShouldBeTerminated .

Also the easiest way to determine if the worker was requested to shutdown is to use Worker::workerShouldTerminate. This way you don't have to pull a job off the queue to see if it is a terminate worker job.