Reputation: 1397
I'm using a simple windows service app. Some of the code takes around a minute to finish executing. If I want to rollout news changes to production, how do I ensure that even after I stopped the service, the service finished what ever it's executing?
Upvotes: 0
Views: 246
Reputation: 3886
Your new service would need to check to make sure the old process isn't running.
How can I verify if a Windows Service is running
A better way would be to fix your service so it can be shutdown in a reasonable length of time. A minute is much too long to stop a service.
Whatever it's doing needs to be able to cleanly stop or roll back on request.
Upvotes: 1