mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-08 09:24:17 +00:00
no endless loop if queue too recent (#4349)
This commit is contained in:
parent
4a740ee80a
commit
0e6669f617
|
@ -152,7 +152,15 @@ impl InstanceWorker {
|
|||
self.save_and_send_state(pool).await?;
|
||||
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
|
||||
tokio::select! {
|
||||
() = sleep(*WORK_FINISHED_RECHECK_DELAY) => {},
|
||||
|
|
Loading…
Reference in a new issue