public static async Task <HttpResponseMessage> WarmUp(HttpRequest request, WebScriptHostManager scriptHostManager)
        {
            if (request.Query.TryGetValue("restart", out StringValues value) && string.Compare("1", value) == 0)
            {
                scriptHostManager.RestartHost();
                await scriptHostManager.DelayUntilHostReady();
            }

            return(new HttpResponseMessage(HttpStatusCode.OK));
        }
Ejemplo n.º 2
0
        public static async Task <HttpResponseMessage> WarmUp(HttpRequestMessage request, WebScriptHostManager scriptHostManager)
        {
            var    queryParams = request.GetQueryParameterDictionary();
            string value       = null;

            if (queryParams.TryGetValue("restart", out value) && string.Compare("1", value) == 0)
            {
                scriptHostManager.RestartHost();
                await scriptHostManager.DelayUntilHostReady();
            }

            await StandbyManager.WarmUp(scriptHostManager.Instance);

            return(new HttpResponseMessage(HttpStatusCode.OK));
        }