Skip to content

Instantly share code, notes, and snippets.

@camous
Created March 14, 2017 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camous/bf16f7b36bfac4413fd3be049f00e639 to your computer and use it in GitHub Desktop.
Save camous/bf16f7b36bfac4413fd3be049f00e639 to your computer and use it in GitHub Desktop.
public class Program
{
static JobHost host = null;
static void Main(string[] args)
{
var cancellationToken = new WebJobsShutdownWatcher().Token;
cancellationToken.Register(() =>
{
ShutdownGraceFully();
host.Stop();
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment