private void LogTaskStarted(TaskInfo info) { var logMessage = Messages.TaskStarted(info); ThreadSafeColoredConsole.Info(logMessage); }
private void LogTaskFinished(TaskInfo info, double completionSeconds) { var logMessage = Messages.TaskFinished(info, completionSeconds); ThreadSafeColoredConsole.Info(logMessage); }
private void LogTaskStarted(TaskInfo info) { var logMessage = Messages.TaskStarted(info); Trace.Info(logMessage); }
private void LogTaskFinished(TaskInfo info, double completionSeconds) { var logMessage = Messages.TaskFinished(info, completionSeconds); Trace.Info(logMessage); }
public static string TaskThrewException(TaskInfo info) => $"[{DateTime.Now.ToShortTimeString()}] Task Error: {info.AssemblyName}.{info.MethodName} threw an exception. (Task Id: {info.Id})";
private void LogTaskException(TaskInfo info, Exception exception) { var logMessage = Messages.TaskThrewException(info); Trace.Exception(logMessage, exception); }
public static string TaskStarted(TaskInfo info) => $"[{DateTime.Now.ToShortTimeString()}] Task Received: {info.AssemblyName}.{info.MethodName} (Task Id: {info.Id})";
public static string TaskFinished(TaskInfo info, double completionSeconds) => $"[{DateTime.Now.ToShortTimeString()}] Task Finished ({completionSeconds}s): {info.AssemblyName}.{info.MethodName} (Task Id: {info.Id})";
internal void AddScheduledTask(TaskInfo taskInfo, TimeSpan interval, string taskName) { _scheduledTasks[taskName] = new TaskSchedule(taskInfo, interval, _taskQueue.Backend); }
private void Enqueue(TaskInfo taskInfo) { var jsonString = Config.TaskInfoSerializer.Serialize(taskInfo); Backend.Enqueue(jsonString); }
internal void AddScheduledTask(TaskInfo taskInfo, TimeSpan interval, string taskName) { // TODO: Support Scheduled Tasks with args _scheduledTasks[taskName] = new TaskSchedule(taskInfo, interval, _taskQueue.Backend); }
public ScheduledTask( TaskInfo taskInfo, TimeSpan offset, string taskKey) : this(taskInfo, new DateTimeOffset(DateTime.UtcNow + offset), taskKey) { }
private void LogTask(TaskInfo info) { var logMessage = $"Task Received: {info.AssemblyName}.{info.MethodName}"; Console.WriteLine(logMessage); }