예제 #1
0
        private void ChangeJobState(String token, JobStateEnum newJobState)
        {
            SetCoreServiceCredentialsBasedOnConfigValues();
            var job = GetRunningJob(token);

            job.State = newJobState.ToString();
            _coreService.UpdateObject(job);
            _coreService.SaveChanges();
            Debug.WriteLine("Changed state of job with id '{0}' to '{1}'", job.Id, newJobState);
        }
        private void ChangeJobState(String token, JobStateEnum newJobState)
        {
            SetCoreServiceCredentialsBasedOnConfigValues();
            var job = GetRunningJob(token);

            job.State = newJobState.ToString();
            _coreService.UpdateObject(job);
            _coreService.SaveChanges();
            Debug.WriteLine("Changed state of job with id '{0}' to '{1}'", job.Id, newJobState);
        }
예제 #3
0
 private int CountJobState(JobStateEnum state)
 {
     return(this._conn.ExecuteScalar <int>(@"select count(*) from jobs where state = @state;", new { state }));
 }