no endless loop if queue too recent (#4349)

docker-rust-version
phiresky 4 months ago committed by GitHub
parent 4a740ee80a
commit 0e6669f617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save