Service Recovery

101 views
Skip to first unread message

Phillip Haydon

unread,
Mar 21, 2015, 6:34:15 AM3/21/15
to topshelf...@googlegroups.com
Service Recovery seems to be lacking options for Second Failure or Subsequent Failures. 

Either that or it's missing from the documentation. How does one change these settings?

Phill

Dru Sellers

unread,
Mar 21, 2015, 2:51:55 PM3/21/15
to topshelf...@googlegroups.com
What are you expecting to see here? Code examples of where you would expect other things. 

--
You received this message because you are subscribed to the Google Groups "topshelf-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topshelf-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Patterson

unread,
Mar 21, 2015, 11:02:08 PM3/21/15
to topshelf...@googlegroups.com
They are in the API, just not the documentation.

Phillip Haydon

unread,
Mar 21, 2015, 11:21:38 PM3/21/15
to topshelf...@googlegroups.com
Well the api isn't very well designed because there's nothing that comes remotely close to explaining how to do it. 


Sent by Outlook for Android



You received this message because you are subscribed to a topic in the Google Groups "topshelf-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/topshelf-discuss/D-1--gxcwlg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to topshelf-discu...@googlegroups.com.

Chris Patterson

unread,
Mar 21, 2015, 11:52:26 PM3/21/15
to topshelf...@googlegroups.com
Well, you just specify, in order, the actions you would like to take. It adds them to the recovery options change in that order, for primary, secondary, and final.

Dru Sellers

unread,
Mar 21, 2015, 11:53:53 PM3/21/15
to topshelf...@googlegroups.com
Greetings Phill,

"Well the api isn't very well designed because there's nothing that comes remotely close to explaining how to do it. " Seems a bit abrupt for something we are providing for free. 

I haven't user the API myself in quite some time but I took a look at the code and found the following api for service recovery.

x.EnableServiceRecovery(r =>
{
//you can have up to three of these
r.RestartComputer(5, "message");
r.RestartService(0);
//the last one will act for all subsequent failures
r.RunProgram(7, "some command");
r.OnCrashOnly();
r.SetResetPeriod(1);
});

and then i took a look at the windows recovery tab:
Inline image 1

Now granted I am very comfortable to the Topshelf API, but I don't think that "isn't very well designed because there's nothing that comes remotely close to explaining how to do it." when the code seems to line up right with the Service Configuration options.

To your point, I have added some more to the sample, and I'll be adding documentation shortly. 

-d


Dru

unread,
Mar 22, 2015, 12:03:20 AM3/22/15
to topshelf...@googlegroups.com

Phillip Haydon

unread,
Mar 22, 2015, 12:07:41 AM3/22/15
to topshelf...@googlegroups.com
Awesome. Makes much more sense now. Thanks a lot!


Sent by Outlook for Android



--
Reply all
Reply to author
Forward
0 new messages