public static JobManagerTask ToJobManagerTask(this APSIMJob job, Guid jobId, CloudBlobClient blobClient, bool shouldSubmitTasks, bool autoScale) { var cmd = string.Format("cmd.exe /c {0} job-manager {1} {2} {3} {4} {5} {6} {7} {8} {9}", BatchConstants.GetJobManagerPath(jobId), job.BatchAuth.Url, job.BatchAuth.Account, job.BatchAuth.Key, job.StorageAuth.Account, job.StorageAuth.Key, jobId, BatchConstants.GetModelPath(jobId), shouldSubmitTasks, autoScale ); return(new JobManagerTask { CommandLine = cmd, DisplayName = "Job manager task", KillJobOnCompletion = true, Id = BatchConstants.JobManagerName, RunExclusive = false, ResourceFiles = GetResourceFiles(job, blobClient).ToList() }); }
/// <summary> /// Create a job manager task for an azure job. The job manager task controls /// creation and distribution of tasks which get run on the compute nodes. /// </summary> /// <param name="job">Job parameters.</param> private JobManagerTask CreateJobManagerTask(JobParameters job) { Licence licence = new Licence(AzureSettings.Default.LicenceFilePath); var cmd = string.Format("cmd.exe /c {0} job-manager {1} {2} {3} {4} {5} {6} {7} {8} {9}", BatchConstants.GetJobManagerPath(job.ID), licence.BatchUrl, licence.BatchAccount, licence.BatchKey, licence.StorageAccount, licence.StorageKey, job.ID, BatchConstants.GetModelPath(job.ID), job.JobManagerShouldSubmitTasks, job.AutoScale ); return(new JobManagerTask { CommandLine = cmd, DisplayName = "Job manager task", KillJobOnCompletion = true, Id = BatchConstants.JobManagerName, RunExclusive = false, ResourceFiles = GetJobManagerResourceFiles().ToList() }); }