collectiveidea / delayed_job

Database based asynchronous priority queue system -- Extracted from Shopify
http://groups.google.com/group/delayed_job
MIT License
4.82k stars 956 forks source link

Bug regarding checking status when using a last version Daemons gem #1080

Open TemaMix opened 5 years ago

TemaMix commented 5 years ago

Basic info

I have a project with delayed_job and I need to check status delayed_job workers after each deploy using a follow script:

require 'delayed/command' Delayed::Command.new(['start','-n', '2']).daemonize >delayed_job.0: process with pid 47619 started. >delayed_job.1: process with pid 47621 started. Delayed::Command.new(['status']).deamonize

It returns: delayed_job: no instances running

and the same time into pids folder we have follows files: delayed_job.0.pid delayed_job.1.pid

Early, after that I had executed this command, I could get information about current status all workers like as: delayed_job: running [pid 47619] delayed_job: running [pid 47621]

However, after updating the project to Rails 5.2 as well as updated an implicit dependency gem daemons up to version 1.3.1 and after that the following script works incorrectly:

Contributing guidelines

TemaMix commented 5 years ago

@albus522 could you please look at it and let me know if you have any concerns or question regarding changes?

albus522 commented 5 years ago

Historically the daemons gem has been wonky. Process monitoring is a weirdly complex task. I would suggest rolling back to your known good daemons version.

Confusion commented 5 years ago

This is due to daemons changing the format of names of pid files. See https://github.com/thuehlinger/daemons/issues/40. New functionality has been introduced that DelayedJob could call to keep using the current format with newer versions of daemons.