public static void SendTaskRunningStatus(this IExecutorDriver driver, TaskID taskId) { driver.SendStatusUpdate(new TaskStatus { task_id = taskId, state = TaskState.TASK_RUNNING }); }
public static void SendTaskFinishedStatus(this IExecutorDriver driver, TaskID taskId) { driver.SendStatusUpdate(new TaskStatus { task_id = taskId, state = TaskState.TASK_FINISHED }); }
public static void SendTaskErrorStatus(this IExecutorDriver driver, TaskID taskId) { driver.SendStatusUpdate(new TaskStatus { task_id = taskId, state = TaskState.TASK_ERROR }); }
private string RunRendering(TaskID taskId, string url) { var imagePath = Path.Combine(_outputDir, $"{taskId.value}.png"); var startInfo = new ProcessStartInfo("phantomjs"); startInfo.Arguments = $"render.js \"{url}\" \"{imagePath}\""; startInfo.CreateNoWindow = true; startInfo.UseShellExecute = false; var process = Process.Start(startInfo); process.WaitForExit(); return imagePath; }
public Status KillTask(TaskID taskId) { return _bridge.KillTask(taskId); }
public virtual void KillTask(IExecutorDriver driver, TaskID taskId) { }