Example #1
0
        private static void Cleanup(ScheduledTaskDto scheduledTask)
        {
            // TODO: Dispose
            _taskService.EventLog.Log($"Sync finished: {_taskService.ScheduledTaskInfo.SyncOperation}");

            scheduledTask.History = (EventLog) _taskService.EventLog;
            CurrentTask.IsTaskRunning = false;

            _taskService = null;
            _syncService = null;
            _logger = null;
        }
Example #2
0
        private static void InitializeTask(ScheduledTaskDto scheduledTask)
        {
            _taskService = new TaskService(scheduledTask);
            _syncService = new SyncService(_taskService);
            _logger = new Logger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, _taskService.TraceId);

            CurrentTask.IsTaskRunning = true;
            _taskService.EventLog.Log($"Sync started: {scheduledTask.SyncOperation}");
        }