yabeda-rb / yabeda-sidekiq

Yabeda plugin for complete monitoring of Sidekiq
MIT License
124 stars 15 forks source link

Start metric server without initializer ? #7

Closed arkhamRejek closed 5 years ago

arkhamRejek commented 5 years ago

Is there a way to start the server without putting it in an initializer?

arkhamRejek commented 5 years ago

just added it to it's own initializer and added a env variable to start

Envek commented 5 years ago

But why you don't want to put in an initializer for Sidekiq, like in example application?

Also instead of setting env variables you can ask Sidkiq itself whether this process is a worker process or not:

Sidekiq.server?
arkhamRejek commented 5 years ago

@Envek it tried to start the server during our migrations process in our deploy process but it's already running from a previous rails process which calls the initializer. It was making our build error out for our worker & scheduler in our docker containers. So we added a flag to allow us to turn it off, well not turn it off but not to call it because that exception causes our job to exit