Skip to content

Commit af07bd1

Browse files
committed
Add options for non-rails event_catcher worker
1 parent 073859a commit af07bd1

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
class ManageIQ::Providers::Vmware::InfraManager::EventCatcher < ManageIQ::Providers::BaseManager::EventCatcher
22
require_nested :Runner
3+
4+
self.rails_worker = !!worker_settings[:rails_worker]
35
end

app/models/manageiq/providers/vmware/infra_manager/event_catcher/runner.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,21 @@ def sub_type_and_name(event)
9797

9898
[sub_event_type, display_name]
9999
end
100+
101+
private
102+
103+
def worker_options
104+
super.merge(
105+
:ems => [
106+
@ems.attributes.merge(
107+
"endpoints" => @ems.endpoints,
108+
"authentications" => @ems.authentications
109+
)
110+
]
111+
)
112+
end
113+
114+
def worker_cmdline
115+
ManageIQ::Providers::Vmware::Engine.root.join("workers/event_catcher/worker").to_s
116+
end
100117
end

config/settings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
:flooding_monitor_enabled: true
4242
:poll: 1.seconds
4343
:ems_event_max_wait: 60
44+
:rails_worker: false
4445
:event_catcher_vmware_cloud:
4546
:poll: 15.seconds
4647
:duration: 10.seconds

0 commit comments

Comments
 (0)