arturictus / sidekiq_alive

Liveness probe for Sidekiq in Kubernetes deployments
MIT License
189 stars 57 forks source link

DISABLE_SIDEKIQ_ALIVE="false" disables sidekiq alive #50

Closed bugthing closed 3 years ago

bugthing commented 3 years ago

thanks for this gem, really useful for us :)

The dotenv gem is pretty popular. The behaviour of this gem is to provide an ENV var if it is not present in the executing environment already.

The means its hard to remove environment variables but easy to over write them, I see the code only checks the truthlyness of the env variable DISABLE_SIDEKIQ_ALIVE .. would you consider something like the following??

SidekiqAlive.start if ENV.fetch('DISABLE_SIDEKIQ_ALIVE', '').casecmp("true") >= 0
arturictus commented 3 years ago

Hi @bugthing, Good catch! I'm merging your suggestion with #54