ndscheduler
ndscheduler copied to clipboard
Make registration of SIGINT handler optional
There are environments in which it is undesirable to register a handler for the SIGINT signal (for example, when running under a service manager framework which runs the scheduler in a thread other than the primary thread). It is possible to bypass this registration by overriding SchedulerServer.run()
but that approach has its own drawbacks. Better would be to either accept an optional keyword argument to run()
to suppress the call to signal.signal
or (possibly more elegant) support a flag in the settings
dictionary. What do you think?
The comments for issue #22 lead me to think that adding an optional keyword argument to SchedulerServer.run()
would be preferable to using the settings
dictionary in the view of the project maintainers. Do you agree? Have any preferences for the argument's name?