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 module #14

Open
VitalyOstanin opened this issue Jun 18, 2014 · 3 comments
Open

Daemon module #14

VitalyOstanin opened this issue Jun 18, 2014 · 3 comments

Comments

@VitalyOstanin
Copy link

I propose to explore the possibility of creating a separate module that implements daemon'ization (linux daemon howto).

Daemon'ization need to go to the background and transfer control to the code payload. Code and its dependencies should be minimal (less often to update), resource costs, too (to reduce the risk of killing by kernel).

The module can be individually implement an interface for integration in luster.

@kaero kaero self-assigned this Jun 18, 2014
@wayx wayx assigned wayx and unassigned kaero Jul 3, 2014
@kaero kaero unassigned wayx Aug 7, 2014
@corpix
Copy link
Contributor

corpix commented Jul 22, 2015

I have implemented an external daemonization tool for luster https://github.com/corpix/luster-daemon
Take a look, it's pretty simple.

@VitalyOstanin
Copy link
Author

Looks good, thank you!

process.env.__daemon = true;

For node apps you should use 'NODE_' prefix in env vars.

var reportTime = 15; // sec

Best to be configurable.

console.log(util.format('Waiting for message from all(%s) workers...', workers.length));

util.format already used internally in console.log

@corpix
Copy link
Contributor

corpix commented Oct 19, 2015

For node apps you should use 'NODE_' prefix in env vars.

I believe NODE_ is reserved for internal nodejs things, not external modules.

var reportTime = 15; // sec
Best to be configurable.
...
console.log(util.format('Waiting for message from all(%s) workers...', workers.length));

You are right, will be fixed in next release.

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

No branches or pull requests

4 participants