feat(backend): workers are instantly ready and sync with global cache in background

This commit is contained in:
Ruben Fiszel
2023-04-21 09:45:25 +02:00
parent 68ab75169a
commit 670ba51d9b
7 changed files with 78 additions and 50 deletions
@@ -470,6 +470,9 @@ pub async fn handle_python_reqs(
#[cfg(feature = "enterprise")]
if let Some(ref bucket) = *S3_CACHE_BUCKET {
sqlx::query_scalar!("UPDATE queue SET last_ping = now() WHERE id = $1", job_id)
.execute(db)
.await?;
if pull_from_tar(bucket, venv_p.clone()).await.is_ok() {
req_paths.push(venv_p.clone());
continue;