Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monitor_solid_queue not working on Puma Plugin #222

Open
K0H205 opened this issue May 8, 2024 · 0 comments
Open

monitor_solid_queue not working on Puma Plugin #222

K0H205 opened this issue May 8, 2024 · 0 comments

Comments

@K0H205
Copy link

K0H205 commented May 8, 2024

Hi🖐️
I'm using the puma plugin to start a solid_queue supervisor.
To make sure that puma is monitoring the supervisor, I kill the supervisor process, but the puma process does not terminate.
Possible causes,
In the solid_queue puma plugin, the registration to the background is done in the hook of the boot event, and puma executes the function registered in the background before boot, so I think that monitor_solid_queue is not being executed.

monitor_solid_queue

If the registration to the background was done outside of the boot event hook, monitor_solid_queue seemed to be executed.

  def start(launcher)
    @log_writer = launcher.log_writer
    @puma_pid = $$

    launcher.events.on_booted do
      @solid_queue_pid = fork do
        Thread.new { monitor_puma }
        SolidQueue::Supervisor.start(mode: :all)
      end
    end

    launcher.events.on_stopped { stop_solid_queue }
    launcher.events.on_restart { stop_solid_queue }

    in_background do
      monitor_solid_queue
    end
  end

Solid Queue: 0.3.0
Ruby: 3.2.2
Puma: 6.4.2

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant