コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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;
        }
コード例 #4
0
 public DeadExecutionStatus(LiveExecutionStatus des, TaskStatus Status)
     : this(des, Status, null)
 {
 }