Exemple #1
0
 void finish_user_record(UserRecord ur, Attempt final_attempt)
 {
     if (!ur.Finished())
     {
         StdErrorOut.Instance.StdOut(LogLevel.debug, "finish_user_record -> if (!ur.Finished())");
         ur.add_attempt(final_attempt);
         //emit_metrics(ur);
         StdErrorOut.Instance.StdOut(LogLevel.debug, "finish_cb_(ur)");
         finish_cb_(ur);
     }
 }
Exemple #2
0
        void retry_not_expired(UserRecord ur, DateTime start, DateTime end, string err_code, string err_msg)
        {
            ur.add_attempt(new Attempt().set_start(start).set_end(end).set_error(err_code, err_msg));

            if (ur.expired())
            {
                fail(ur, DateTime.Now, DateTime.Now, "Expired", "Record has reached expiration");
            }
            else
            {
                // TimeSensitive automatically sets the deadline to the expiration if the given deadline is later than the expiration.
                ur.set_deadline_from_now((long)config_.recordMaxBufferedTime / 2);
                retry_cb_(ur);
            }
        }