Comments (8)
We ran into that, when "script/delayed_job stop" and "script/delayed_job status" stopped working.
from daemons.
+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.
@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.
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.
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.
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.
@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.
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)
- Monitored daemon with multiple=false improperly runs multiple times HOT 1
- OSX hangs on close_io HOT 8
- Failure to install development dependency pry-byebug with '~> 0' version constrain HOT 4
- Stopping daemon log file error? HOT 4
- apps inherit app_name even when new name is specified HOT 1
- Windows: fork() function is unimplemented on this machine (NotImplementedError) HOT 5
- Specify number of processes HOT 3
- Where is the documentation? HOT 1
- run many workers HOT 2
- Run n Instances of a script parallelly in background and kill all of them when needed.
- Run script files in background (as daemons) HOT 2
- Turns out delayed_job was executing a job causing a segmentation fault, which would kill the delayed_job daemon. HOT 1
- Why parent process does not care about child
- Detatch doesn't consider external logging
- Question: Semantic Versioning HOT 2
- Make working directory compatible with macOS Catalina
- `daemons` always exits with zero
- Problematic behavior when handling TERM Signal
- NoMethodError: undefined method `positive?' for 20:Fixnum
- Zombie/Defunct process when monitoring using pidfiles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from daemons.