F
Farraige
Hi!
I hope you will help me. I have the following problem....
I have implemented a Windows NT service using win32serviceutil. The service
runs a 'working loop' in another thread and waits for the stop event to be
set. A working loop thread checks the space used by logfiles against the
given upper limit and deletes the files, if the upper limit is reached.
After each space analysis it sleeps for about 30 minutes. The service
handles start/stop/restart/.../update parameters from the command line.
Update command updates by default all the changes made in the service python
code without need to restart the service... What about the situation if my
service reads some configuration datas from its config file? If I change
some data in the configuration files, those changes "will not be seen" after
using update parameter due to none change was made in the service code. Do
you have an idea how to overload the standard behaviour of using update
command line parameter to force the service to reconfigure itself without
restarting? I don't now how to implement communication between the main
function that handles all command (thanks to
win32serviceutil.HandleCommandLine) line parameters and the working thread
that is started by the service in its SvcRun method?
Thanks in advance for any hints!
Best wishes,
Niki
I hope you will help me. I have the following problem....
I have implemented a Windows NT service using win32serviceutil. The service
runs a 'working loop' in another thread and waits for the stop event to be
set. A working loop thread checks the space used by logfiles against the
given upper limit and deletes the files, if the upper limit is reached.
After each space analysis it sleeps for about 30 minutes. The service
handles start/stop/restart/.../update parameters from the command line.
Update command updates by default all the changes made in the service python
code without need to restart the service... What about the situation if my
service reads some configuration datas from its config file? If I change
some data in the configuration files, those changes "will not be seen" after
using update parameter due to none change was made in the service code. Do
you have an idea how to overload the standard behaviour of using update
command line parameter to force the service to reconfigure itself without
restarting? I don't now how to implement communication between the main
function that handles all command (thanks to
win32serviceutil.HandleCommandLine) line parameters and the working thread
that is started by the service in its SvcRun method?
Thanks in advance for any hints!
Best wishes,
Niki