Skip to content

Instantly share code, notes, and snippets.

@mattes
Created Oct 30, 2020
Embed
What would you like to do?
Resque in distroless docker container
# config/initializers/resque.rb
module Resque
class Worker
# Monkey patch linux_worker_pids because the original function tries to shell out.
# Since we run distroless in production, there is no shell.
# https://github.com/resque/resque/blob/7f6b88404dd18698f6f4023e18fdc1ae8318e5e5/lib/resque/worker.rb#L839
def linux_worker_pids
[Process.pid]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment