diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-22 16:51:52 +0000 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-22 16:51:52 +0000 |
commit | e8214cb1807d3145907c7ed9e077fa45ada4aeea (patch) | |
tree | 00192416f1c2d2157988a1c07df4601475a30a73 /src/table_sync.rs | |
parent | c0335ac6904598b9ac367e17651da477d4d970d7 (diff) | |
download | garage-e8214cb1807d3145907c7ed9e077fa45ada4aeea.tar.gz garage-e8214cb1807d3145907c7ed9e077fa45ada4aeea.zip |
Better concurrency:
Use Notify instead of stupid sleep in background worker
Use Semaphore to limit concurrent requests in rpc_client
Make more background tasks cancellable
Diffstat (limited to 'src/table_sync.rs')
-rw-r--r-- | src/table_sync.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/table_sync.rs b/src/table_sync.rs index 6442841d..603c7aa6 100644 --- a/src/table_sync.rs +++ b/src/table_sync.rs @@ -132,10 +132,9 @@ where .await; let s3 = syncer.clone(); - table.system.background.spawn(async move { + tokio::spawn(async move { tokio::time::delay_for(Duration::from_secs(20)).await; s3.add_full_scan().await; - Ok(()) }); syncer |