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

Daemon silently fails if the default pidfile dir (./tmp/pids) doesn't exist #1251

Open
thepry opened this issue Feb 16, 2024 · 2 comments
Open

Comments

@thepry
Copy link
Contributor

thepry commented Feb 16, 2024

Hi, I noticed that runner with --daemonize option silently fails if pidfile dir doesn't exist. Which might be an issue, since tmp dir might be empty and when you don't specify pidfile path, it uses ./tmp/pids/good_job.pid and exists the process without any output.

Is this intentional or a bug? I'd suggest using mkdir_p at least for cases when the pidfile wasn't specified. I can put up a pull request if you're okay with that change.

@bensheldon
Copy link
Owner

I think that's a bug to silently fail.

But I don't think it should create the directory because that should be a Rails standard thing:

https://github.com/rails/rails/blob/c676398d5ed0afe58ac7547f86547c3e85911af1/railties/lib/rails/generators/rails/app/app_generator.rb#L259

I think simplest option would be to log to stderr that it couldn't write the file (whether that is default value or provided)

@thepry
Copy link
Contributor Author

thepry commented Feb 16, 2024

@bensheldon sounds good, i'll put up a pull request

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

No branches or pull requests

2 participants