Skip to content

Conversation

@Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Oct 11, 2024

This PR implements an async variant of the BackgroundJob::enqueue() fn, that can be used inside other async fns, without the need to use spawn_blocking().

I'm not a fan of the (temporary) code duplication, but due to the diesel type madness I wasn't successful in extracting the common parts into shared fns.

@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Oct 11, 2024
@Turbo87 Turbo87 merged commit c553294 into rust-lang:main Oct 13, 2024
10 checks passed
@Turbo87 Turbo87 deleted the async-enqueue branch October 13, 2024 09:35
@codecov
Copy link

codecov bot commented Oct 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 160 lines in your changes missing coverage. Please review.

Project coverage is 88.67%. Comparing base (bbe1922) to head (a909a46).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
src/admin/enqueue_job.rs 0.00% 72 Missing ⚠️
crates/crates_io_worker/src/background_job.rs 0.00% 51 Missing ⚠️
src/admin/delete_crate.rs 0.00% 37 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9632      +/-   ##
==========================================
- Coverage   88.87%   88.67%   -0.20%     
==========================================
  Files         288      288              
  Lines       29264    29326      +62     
==========================================
- Hits        26007    26006       -1     
- Misses       3257     3320      +63     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant