Пример #1
0
        /// <summary>
        /// Polls htcondor api for the status of the job defined in constructor.
        /// </summary>
        /// <returns>current job state</returns>
        public JobState GetJobState()
        {
            pythonScriptExecutor.Execute();
            string jobProperties = pythonScriptExecutor.Response;

            if (jobProperties.Length == 0)
            {
                throw new ShappException("Fetching JobState failed");
            }
            Dictionary <string, string> jobStatesCache = GetJobStatesCacheFromXml(jobProperties);
            int      jobStateId = GetJobStateId(jobStatesCache);
            JobState jobState   = (JobState)jobStateId;

            C.log.Debug(string.Format("Got job state info about job {0}: {1}", JobId, jobState));
            return(jobState);
        }
Пример #2
0
 /// <summary>
 /// Order the job to be removed.
 /// </summary>
 public void Remove()
 {
     pythonScriptExecutor.Execute();
     C.log.Info(string.Format("Removed job from queue with id: {0}", JobId));
 }