Created
October 30, 2020 08:02
-
-
Save mattes/8cf8c200483972aa5add2aa38fd8d3ed to your computer and use it in GitHub Desktop.
Resque in distroless docker container
This file contains hidden or 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
# 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