Ejemplo n.º 1
0
        protected QueryResponse CreateJob(BaseJob model, Type jobType, Dictionary<string, object> dataMap, string description = null)
        {
            var response = new QueryResponse { Valid = true };

            try
            {
                var id = _schedulerCore.CreateJob(model.JobName, model.JobGroup, jobType, dataMap, description, model.Id == Guid.Empty ? (Guid?)null : model.Id);
                response.Id = id;
            }
            catch (Exception ex)
            {
                response.Valid = false;
                response.Errors = new List<Error>
                {
                    new Error
                    {
                        Code = "ErrorCreatingJob",
                        Type = "Server",
                        Message = string.Format("Error: {0}", ex.Message)
                    }
                };
            }

            return response;
        }
 public new QueryResponse CreateJob(BaseJob model, Type jobType, Dictionary<string, object> dataMap)
 {
     return base.CreateJob(model, jobType, dataMap);
 }