Reinstate backoffs on startup
This commit is contained in:
parent
fc69b1b192
commit
bb396dfb5b
|
@ -14,7 +14,7 @@ use signal_hook::iterator::Signals;
|
|||
use std::path::PathBuf;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{Arc, Mutex, RwLock};
|
||||
use std::time::Duration;
|
||||
use std::time::{Duration, SystemTime};
|
||||
use tokio::fs::File;
|
||||
use tokio::sync::{mpsc, oneshot, Notify, Semaphore};
|
||||
use tokio::time::MissedTickBehavior;
|
||||
|
@ -270,6 +270,15 @@ pub async fn main() -> anyhow::Result<()> {
|
|||
notify: graceful_stop_notify,
|
||||
};
|
||||
|
||||
// Reinstate old backoffs
|
||||
store
|
||||
.async_rw_txn(|txn| {
|
||||
txn.reinstate_backoffs(SystemTime::now())?;
|
||||
txn.commit()?;
|
||||
Ok(())
|
||||
})
|
||||
.await?;
|
||||
|
||||
let mut tasks = Vec::with_capacity(num_tasks as usize);
|
||||
|
||||
for task_num in 0..num_tasks {
|
||||
|
|
Loading…
Reference in New Issue