Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Command line arguments not retained after automatic restart #53

Open
theintz opened this issue Aug 18, 2014 · 5 comments
Open

Command line arguments not retained after automatic restart #53

theintz opened this issue Aug 18, 2014 · 5 comments

Comments

@theintz
Copy link

theintz commented Aug 18, 2014

I am using command line arguments to control the behavior of the daemon, but they are lost when the daemon restarts. This makes the auto-restart feature unusable for me.

The problem centers around Core_Daemon::command() where the filename of the script is built. Here some default arguments (-d --recoverworkers) are appended, but the original arguments are not mentioned at all.

@shaneharter
Copy link
Owner

Sorry you're having trouble! Can you overload the command() method to include your own params?

@theintz
Copy link
Author

theintz commented Aug 21, 2014

Unfortunately not, because it's marked private.

@shaneharter
Copy link
Owner

If you'd like to change to protected and send a pull request I'm happy to
merge it. Being private was strictly about choosing the most conservative
option.

On Thu, Aug 21, 2014 at 9:13 AM, Tobias Heintz [email protected]
wrote:

Unfortunately not, because it's marked private.


Reply to this email directly or view it on GitHub
#53 (comment)
.

@theintz
Copy link
Author

theintz commented Aug 21, 2014

Great, I'll try it out locally and if that solves the issue (combined with saving the arguments in getopt() it should), I'll send you a pull request.

@theintz
Copy link
Author

theintz commented Aug 26, 2014

I've made command() (or rather the 2.0 equivalent getFilename) protected and I'm overriding it in my daemon class. In getopt() I'm saving the entirety of $argv. This solution seems to work nicely. Since I'm working on 2.0, I can't send a pull request to your current master. Maybe you can fix it directly?

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

No branches or pull requests

2 participants