-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed task_id to tracking_label #15443
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be great.
@mkanoor I'd like to review these with you just to ensure they are all actually just label purposes and not "cannot run concurrently" purposes. |
@@ -62,7 +62,7 @@ def job_check_for_evm_snapshots(job_not_found_delay) | |||
|
|||
def job_proxy_dispatcher_dispatch | |||
if JobProxyDispatcher.waiting? | |||
queue_work_on_each_zone(:class_name => "JobProxyDispatcher", :method_name => "dispatch", :task_id => "job_dispatcher", :priority => MiqQueue::HIGH_PRIORITY, :role => "smartstate") | |||
queue_work_on_each_zone(:class_name => "JobProxyDispatcher", :method_name => "dispatch", :tracking_label => "job_dispatcher", :priority => MiqQueue::HIGH_PRIORITY, :role => "smartstate") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is intentional to avoid multiple job_proxy_dispatchers from running simultaneously.
queue_work(:class_name => "MiqServer", :method_name => "log_status", :task_id => "log_status", :server_guid => MiqServer.my_guid, :priority => MiqQueue::HIGH_PRIORITY) | ||
queue_work(:class_name => "MiqWorker", :method_name => "log_status_all", :task_id => "log_status", :server_guid => MiqServer.my_guid, :priority => MiqQueue::HIGH_PRIORITY) | ||
queue_work(:class_name => "MiqServer", :method_name => "log_status", :tracking_label => "log_status", :server_guid => MiqServer.my_guid, :priority => MiqQueue::HIGH_PRIORITY) | ||
queue_work(:class_name => "MiqWorker", :method_name => "log_status_all", :tracking_label => "log_status", :server_guid => MiqServer.my_guid, :priority => MiqQueue::HIGH_PRIORITY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this to avoid logging multiple times, but we can probably dump it altogether. Can't see why this would need a tracking label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please keep the lines aligned as was previously.
:instance_id => id, | ||
:method_name => "do_post_provision", | ||
:deliver_on => 1.minutes.from_now.utc, | ||
:tracking_label => "#{self.class.name.underscore}_#{id}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this just be inherited, and thus not explicitly listed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fryguy I will do this in a separate PR
:args => [args], | ||
:role => 'automate', | ||
:zone => options.fetch(:miq_zone, zone), | ||
:tracking_label => "#{self.class.name.underscore}_#{id}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems duplicate to the "deliver_to_automate" above...can we extract and DRY up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fryguy I will do this in a separate PR
In the places where the task_id is being used for tracking a collection of tasks, change it to tracking_label.
This area is being reworked by Greg M and Tina
b82fc70
to
5b4b1ea
Compare
Checked commits mkanoor/manageiq@5576c7e~...5b4b1ea with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/models/service_template_provision_task.rb
spec/models/service_reconfigure_task_spec.rb
spec/models/service_template_provision_task_spec.rb
|
The task_id in queues can be used for 2 purposes
In the places where the task_id is being used for tracking a collection of tasks, this PR changes it to tracking_label.