Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle pid in run_single_worker.rb properly
In classes that inherit from MiqQueueWorkerBase, they will fetch images using `MiqQueue.get`. Part of what is done in that is calling `MiqWorker.my_worker`. This basically makes a call to find a worker with the `pid` value that matches the same pid used by the current process. Unfortunately, this is normally set by the `MiqServer` prior to forking the worker, so this isn't set by `run_single_worker.rb`. To address this, either add to the `create_options` an attribute for `:pid` that will create a new worker with the existing pid of the current process, or if a `:guid` is passed in, update the attributes of the existing worker to set the pid. This is already done by the `MiqServer`, so this is just making the `run_single_worker.rb` handle setting the pid as well.
- Loading branch information