Giter VIP home page Giter VIP logo

Comments (8)

philister avatar philister commented on July 28, 2024 1

We ran into that, when "script/delayed_job stop" and "script/delayed_job status" stopped working.

from daemons.

srswanson avatar srswanson commented on July 28, 2024 1

+1 on delayed_job stop and delayed_job status no longer working with version 1.2.3. Delayed_job works properly after reverting back to daemons v1.1.9.

from daemons.

thuehlinger avatar thuehlinger commented on July 28, 2024 1

@tardate Thanks for the testing and foremost for the pull request. I think your analysis and fix is reasonable. I have just merged it and I am about to prepare a release 1.3.0 which also includes your other merge request.

from daemons.

joshuasiler avatar joshuasiler commented on July 28, 2024

Looks like this is the commit that broke delayed_jobs
55382e5

Delayed jobs creates pid files that are delayed_job.1.pid, delayed_job.2.pid etc.

from daemons.

thuehlinger avatar thuehlinger commented on July 28, 2024

I feel that this should be fixed in delayed_jobs, not in daemons. Before 1.2.3, the .pid file matching in daemons was too loose (glob for process_name*.pid). This has been corrected in 1.2.3. If delay_jobs is using process names with ascending numbers for start, it should also use them for status and stop.

from daemons.

tardate avatar tardate commented on July 28, 2024

yes, also just run into this via delayed_job. Looking at the respective changes, it appears as if the issue is just a pid file naming convention clash?

DelayedJob still uses: delayed_job.1.pid, delayed_job.2.pid etc.
This is now a miss-match on the glob in daemons 1.2.3+ https://github.com/thuehlinger/daemons/blob/master/lib/daemons/pidfile.rb#L34
as daemons now expects (the very ugly IMHO!) delayed_job_num1.pid, delayed_job_num2.pid etc.

So if I'm reading this right, if DelayedJob switched its forced filename convention to match the form now expected by daemons ... it should all just work. @thuehlinger does that make sense? I'll try to test that theory now..

from daemons.

tardate avatar tardate commented on July 28, 2024

@thuehlinger ran a little test - see evendis/delayed_job@87a396a
which seems to confirm this is just a pid-file naming convention disagreement.

The commit switches delayed job to use the new convention for daemons 1.2.3+ (<base>_num<i>), and solves the start/stop issue.

However, changing the process/pid file naming convention for DelayedJob is probably not a very good idea. I know it is very common for scripts to be looking for delayed_job processes, and since it is a very old gem in wide use, there is an unknown amount of churn that would be created by changing the process name format.

Perhaps a better approach would be to expose the globing format as a configurable option in daemons. It could default to the new <base>_num<i>, but downstream projects like DelayedJob could poke in their own format (without resorting to monkey patches) and thus preserve their own legacy compatibility. What do you think? I can offer a PR if you think this approach has merit.

from daemons.

ultrawebmarketing avatar ultrawebmarketing commented on July 28, 2024

I'm using daemons 1.3.1 and delayed_job 4.1.5 and still having this issue. Is there something i'm missing?

from daemons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.