Skip to content

convert to daemon process, instead of cron job#1

Open
nshn wants to merge 1 commit into
ganglia:masterfrom
nshn:master
Open

convert to daemon process, instead of cron job#1
nshn wants to merge 1 commit into
ganglia:masterfrom
nshn:master

Conversation

@nshn
Copy link
Copy Markdown

@nshn nshn commented Nov 11, 2013

I have changed the code, to be run as a daemon process instead of cron job. As it was mentioned in the README file, it can be run every 1 or 5 minutes typically; therefore I have used 60 seconds sleep time between its runs. The second part of the program, which is listening on sockets, is repeated forever (with 60 seconds delay), and the first part of the program which is reading configuration file, is only done one time, initially. If there is some exception in the first part (reading configuration file), the exception is catched, and it does not enter the second part “listening on socket connection” {it gives “Failed to read configuration file” message.}; Therefore, the second part is only repeated when there has been no exception in the first part. This way, unnecessary repeating of the second part (when the first part has exception) has been omitted.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants