public static bool TryRemoveJob(JobID jobID, out JobAction job) { if (Jobs.TryRemove(jobID, out job)) { Log.WriteDebug("Job Manager", "Removed job: {0} ({1} jobs left)", jobID, Jobs.Count); return(true); } return(false); }
public static bool TryRemoveJob(JobID jobID, out JobAction job) { if (Jobs.TryRemove(jobID, out job)) { Log.WriteDebug("Job Manager", "Removed job: {0} ({1} jobs left)", jobID, Jobs.Count); return true; } return false; }
public static void AddJob(Func <JobID> action) { var jobID = action(); var job = new JobAction { Action = action }; Log.WriteDebug("Job Manager", "New job: {0}", jobID); Jobs.TryAdd(jobID, job); }
public static bool TryRemoveJob(JobID jobID, out JobAction job) { if (Jobs.TryRemove(jobID, out job)) { #if DEBUG Log.WriteDebug(nameof(JobManager), $"Removed job: {jobID} ({Jobs.Count} jobs left)"); #endif return(true); } return(false); }
public static void AddJob(Func<JobID> action) { var jobID = action(); var job = new JobAction { Action = action }; Log.WriteDebug("Job Manager", "New job: {0}", jobID); Jobs.TryAdd(jobID, job); }
public static void AddJob(Func <JobID> action, DepotProcessor.ManifestJob manifestJob) { var jobID = action(); var job = new JobAction { Action = action, ManifestJob = manifestJob }; Log.WriteDebug("Job Manager", "New depot job: {0} ({1} - {2})", jobID, manifestJob.DepotID, manifestJob.ManifestID); Jobs.TryAdd(jobID, job); }
public static void AddJob(Func <JobID> action, CommandArguments command) { var jobID = action(); var job = new JobAction { Action = action, Command = command }; // Chat rooms don't have full message saved Log.WriteDebug("Job Manager", "New chat job: {0} ({1})", jobID, command.Message); Jobs.TryAdd(jobID, job); }
public static void AddJob(Func <JobID> action) { var jobID = action(); var job = new JobAction { Action = action }; #if DEBUG Log.WriteDebug(nameof(JobManager), $"New job: {jobID}"); #endif Jobs.TryAdd(jobID, job); }
public static void AddJob(Func<JobID> action, CommandArguments command) { var jobID = action(); var job = new JobAction { Action = action, Command = command }; // Chat rooms don't have full message saved Log.WriteDebug("Job Manager", "New chat job: {0} ({1})", jobID, command.Message); Jobs.TryAdd(jobID, job); }
public static void AddJob(Func <JobID> action, object metadata) { var jobID = action(); var job = new JobAction { Action = action, Metadata = metadata, }; #if DEBUG Log.WriteDebug(nameof(JobManager), $"New job: {jobID} (with data)"); #endif Jobs.TryAdd(jobID, job); }
public static void AddJob(Func <JobID> action, CommandArguments command) { var jobID = action(); var job = new JobAction { Action = action, Command = command }; #if DEBUG // Chat rooms don't have full message saved Log.WriteDebug(nameof(JobManager), $"New chat job: {jobID} ({command.Message})"); #endif Jobs.TryAdd(jobID, job); }
public static void AddJob(Func<JobID> action, IRCRequest request) { RemoveStaleJobs(); var jobID = action(); request.ExpireTime = DateTime.Now + TimeSpan.FromSeconds(CHAT_COMMAND_TIMEOUT); var job = new JobAction { Action = action, CommandRequest = request }; // Chat rooms don't have full message saved Log.WriteDebug("Job Manager", "New chat job: {0} ({1})", jobID, request.Command.Message); Jobs.TryAdd(jobID, job); }
public static void AddJob(Func <JobID> action, IRCRequest request) { RemoveStaleJobs(); var jobID = action(); request.ExpireTime = DateTime.Now + TimeSpan.FromSeconds(CHAT_COMMAND_TIMEOUT); var job = new JobAction { Action = action, CommandRequest = request }; // Chat rooms don't have full message saved Log.WriteDebug("Job Manager", "New chat job: {0} ({1})", jobID, request.Command.Message); Jobs.TryAdd(jobID, job); }
public static void AddJob(Func<JobID> action, DepotProcessor.ManifestJob manifestJob) { var jobID = action(); var job = new JobAction { Action = action, ManifestJob = manifestJob }; Log.WriteDebug("Job Manager", "New depot job: {0} ({1} - {2})", jobID, manifestJob.DepotID, manifestJob.ManifestID); Jobs.TryAdd(jobID, job); }