lock into the future, instead of lock into past
This commit is contained in:
parent
92e04e0a3f
commit
8e71a7e4de
@ -417,12 +417,22 @@ schedule_transfers (struct WireAccount *wa)
|
|||||||
wa = wa_head;
|
wa = wa_head;
|
||||||
GNUNET_assert (NULL != wa);
|
GNUNET_assert (NULL != wa);
|
||||||
}
|
}
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
if (shard_done)
|
||||||
"Will try to lock next shard of %s in %s\n",
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
wa->job_name,
|
"Will retry my shard (%llu,%llu] of %s in %s\n",
|
||||||
GNUNET_STRINGS_relative_time_to_string (
|
(unsigned long long) wa->shard_start,
|
||||||
GNUNET_TIME_absolute_get_remaining (wa->delayed_until),
|
(unsigned long long) wa->shard_end,
|
||||||
GNUNET_YES));
|
wa->job_name,
|
||||||
|
GNUNET_STRINGS_relative_time_to_string (
|
||||||
|
GNUNET_TIME_absolute_get_remaining (wa->delayed_until),
|
||||||
|
GNUNET_YES));
|
||||||
|
else
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
|
"Will try to lock next shard of %s in %s\n",
|
||||||
|
wa->job_name,
|
||||||
|
GNUNET_STRINGS_relative_time_to_string (
|
||||||
|
GNUNET_TIME_absolute_get_remaining (wa->delayed_until),
|
||||||
|
GNUNET_YES));
|
||||||
GNUNET_assert (NULL == task);
|
GNUNET_assert (NULL == task);
|
||||||
task = GNUNET_SCHEDULER_add_at (wa->delayed_until,
|
task = GNUNET_SCHEDULER_add_at (wa->delayed_until,
|
||||||
&lock_shard,
|
&lock_shard,
|
||||||
|
@ -12929,8 +12929,7 @@ postgres_begin_shard (void *cls,
|
|||||||
GNUNET_PQ_result_spec_end
|
GNUNET_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
|
|
||||||
past = GNUNET_TIME_absolute_subtract (GNUNET_TIME_absolute_get (),
|
past = GNUNET_TIME_absolute_get ();
|
||||||
delay);
|
|
||||||
qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
|
qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
|
||||||
"get_open_shard",
|
"get_open_shard",
|
||||||
params,
|
params,
|
||||||
@ -12956,7 +12955,8 @@ postgres_begin_shard (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
now = GNUNET_TIME_timestamp_get ();
|
now = GNUNET_TIME_absolute_to_timestamp (
|
||||||
|
GNUNET_TIME_relative_to_absolute (delay));
|
||||||
qs = GNUNET_PQ_eval_prepared_non_select (pg->conn,
|
qs = GNUNET_PQ_eval_prepared_non_select (pg->conn,
|
||||||
"reclaim_shard",
|
"reclaim_shard",
|
||||||
params);
|
params);
|
||||||
@ -13030,9 +13030,10 @@ postgres_begin_shard (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
now = GNUNET_TIME_timestamp_get ();
|
now = GNUNET_TIME_absolute_to_timestamp (
|
||||||
|
GNUNET_TIME_relative_to_absolute (delay));
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Trying to claim shard %llu-%llu\n",
|
"Trying to claim shard (%llu-%llu]\n",
|
||||||
(unsigned long long) *start_row,
|
(unsigned long long) *start_row,
|
||||||
(unsigned long long) *end_row);
|
(unsigned long long) *end_row);
|
||||||
qs = GNUNET_PQ_eval_prepared_non_select (pg->conn,
|
qs = GNUNET_PQ_eval_prepared_non_select (pg->conn,
|
||||||
|
Loading…
Reference in New Issue
Block a user