예제 #1
0
        public void UpdateEventDirectors(string key, string connectionId)
        {
            if (key == WebConfigHelper.TaskSchedulerSecretKey)
            {
                try
                {
                    TaskServices.UpdateEventDirectors();

                    var log = CreateInternalLog("The task UpdateEventDirectors completed.", AutoIntegrationUser);
                    ExternalLogHelper.Log(log, LoggingEventType.Information);

                    if (!string.IsNullOrWhiteSpace(connectionId))
                    {
                        ProgressHub.SendProgress(connectionId, "Done", 1, 1, TaskType.UpdateEventDirectors.GetHashCode());
                    }
                }
                catch (Exception exc)
                {
                    var log     = CreateInternalLog("The task UpdateEventDirectors failed!", AutoIntegrationUser);
                    var message = log.AdditionalInfo + " | " + exc.GetFullMessage();
                    ExternalLogHelper.Log(message, LoggingEventType.Fatal);
                }
            }
        }