Python time.sleep() doesn't work in command_line
Posted: Mon Jul 08, 2013 3:17 pm
Hello,
I'm facing a weird problem, I've got a simple:
define command {
command_name notify-service-by-email
command_line /opt/test.py --message "$SERVICEOUTPUT$"
}
The test.py contains a loop with a time.sleep(300) between elements, the first element of the loop is executed and then the program is exited. It's strange because it should loop over all items before quiting, When I run manualy the Python script everything is fine.
Is there a timeout or something within 'command_line' preventing the time.sleep() to be executed?
Thank you,
I'm facing a weird problem, I've got a simple:
define command {
command_name notify-service-by-email
command_line /opt/test.py --message "$SERVICEOUTPUT$"
}
The test.py contains a loop with a time.sleep(300) between elements, the first element of the loop is executed and then the program is exited. It's strange because it should loop over all items before quiting, When I run manualy the Python script everything is fine.
Is there a timeout or something within 'command_line' preventing the time.sleep() to be executed?
Thank you,