-
Notifications
You must be signed in to change notification settings - Fork 898
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace MIQ_WORKER_TYPES constant by using MiqWorkerType model
- Loading branch information
Showing
8 changed files
with
12 additions
and
182 deletions.
There are no files selected for viewing
11 changes: 2 additions & 9 deletions
11
app/models/miq_server/worker_management/monitor/class_names.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
require "workers/miq_worker_types" | ||
|
||
module MiqServer::WorkerManagement::Monitor::ClassNames | ||
extend ActiveSupport::Concern | ||
|
||
# This are loaded from `lib/workers/miq_worker_types.rb`, and are just a | ||
# memory reference to them for compatability. | ||
MONITOR_CLASS_NAMES = MIQ_WORKER_TYPES.keys | ||
MONITOR_CLASS_NAMES_IN_KILL_ORDER = MIQ_WORKER_TYPES_IN_KILL_ORDER | ||
|
||
module ClassMethods | ||
def monitor_class_names | ||
MONITOR_CLASS_NAMES | ||
MiqWorkerType.pluck(:worker_type) | ||
end | ||
|
||
def monitor_class_names_in_kill_order | ||
MONITOR_CLASS_NAMES_IN_KILL_ORDER | ||
MiqWorkerType.in_kill_order.pluck(:worker_type) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters