AddJob() public method

public AddJob ( Exception, job ) : void
job Exception,
return void
Beispiel #1
0
    public void ReturnFailedJob()
    {
        if (targetJob.GetJobType() != "Wander")
        {
            Debug.Log("Returning failed job: " + targetJob.GetJobType());

            failedJobs.Add(targetJob);
            jobQueue.AddJob(targetJob);
        }

        // Clear the job
        targetJob = currentJob = null;
    }
Beispiel #2
0
 void OnEnable()
 {
     queue = new JobQueue <CalcLimit2>(2); // create new queue with 2 threads
     queue.AddJob(new CalcLimit2 {
         count = 200, CustomName = "200 iterations"
     });
     queue.AddJob(new CalcLimit2 {
         count = 20, CustomName = "Do 20 iterations"
     });
     queue.AddJob(new CalcLimit2 {
         count = 9001, CustomName = "over 9000"
     });
     queue.AddJob(new CalcLimit2 {
         count = 50000000, CustomName = "50M"
     });
 }
Beispiel #3
0
 public override bool RunJob(JobQueue jobQueue)
 {
     // Backup
     if (!makeMKVService.Backup(diskTitle, progressReporter))
     {
         return(false);
     }
     if (keepMovies)
     {
         // This means the source of the next job is the output of the current job. These files will not be deleted after encoding.
         jobQueue.AddJob(new EncodeMovieJob(handBrakeService, diskTitle.FullMKVPath, true));
     }
     return(true);
 }