public static List <LiveExecutionStatus> GetAndLockExpired(SqlConnection conn, SqlTransaction trans, int iTimeoutMilliSeconds) { List <LiveExecutionStatus> lItems = new List <LiveExecutionStatus>(); using (SqlCommand cmd = new SqlCommand(tsql.Extractor.Get("LiveExecutionStatus.GetAndLockExpired"), conn, trans)) { var param = new SqlParameter("@timeoutMilliSeconds", System.Data.SqlDbType.BigInt); param.Value = iTimeoutMilliSeconds; cmd.Parameters.Add(param); cmd.Prepare(); using (SqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { LiveExecutionStatus les = new LiveExecutionStatus(); les.ParseFromDataReader(reader); lItems.Add(les); } } } return(lItems); }
public static List <LiveExecutionStatus> GetAndLockAll(SqlConnection conn, SqlTransaction trans, DateTime minLastUpdate) { List <LiveExecutionStatus> lItems = new List <LiveExecutionStatus>(); using (SqlCommand cmd = new SqlCommand(tsql.Extractor.Get("LiveExecutionStatus.GetAndLockAll"), conn, trans)) { var param = new SqlParameter("@lastUpdate", System.Data.SqlDbType.DateTime); param.Value = minLastUpdate; cmd.Parameters.Add(param); cmd.Prepare(); using (SqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { LiveExecutionStatus les = new LiveExecutionStatus(); les.ParseFromDataReader(reader); lItems.Add(les); } } } return(lItems); }
public DeadExecutionStatus(LiveExecutionStatus les, TaskStatus Status, string ReturnCode) : base(les.TaskID, les.ServerID, les.ScheduleID) { ID = les.ID; this.LastUpdate = les.LastUpdate; this.Inserted = les.Inserted; this.Status = Status; this.ReturnCode = ReturnCode; this.Inserted = Inserted; }
public DeadExecutionStatus(LiveExecutionStatus des, TaskStatus Status) : this(des, Status, null) { }