mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 12:21:18 +00:00
no endless loop if queue too recent (#4349)
This commit is contained in:
parent
4a740ee80a
commit
0e6669f617
1 changed files with 9 additions and 1 deletions
|
@ -152,7 +152,15 @@ impl InstanceWorker {
|
||||||
self.save_and_send_state(pool).await?;
|
self.save_and_send_state(pool).await?;
|
||||||
latest_id
|
latest_id
|
||||||
};
|
};
|
||||||
if id == latest_id {
|
if id >= latest_id {
|
||||||
|
if id > latest_id {
|
||||||
|
tracing::error!(
|
||||||
|
"{}: last successful id {} is higher than latest id {} in database (did the db get cleared?)",
|
||||||
|
self.instance.domain,
|
||||||
|
id.0,
|
||||||
|
latest_id.0
|
||||||
|
);
|
||||||
|
}
|
||||||
// no more work to be done, wait before rechecking
|
// no more work to be done, wait before rechecking
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
() = sleep(*WORK_FINISHED_RECHECK_DELAY) => {},
|
() = sleep(*WORK_FINISHED_RECHECK_DELAY) => {},
|
||||||
|
|
Loading…
Reference in a new issue