Skip to content

Conversation

@PaulM5406
Copy link
Contributor

Hey @TkTech,

I would like to be able to override get_function_and_kwargs in custom executor to be able to dynamically inject other kwargs like it is possible with QueueJob.

Thanks !

@codecov
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.31%. Comparing base (4026904) to head (acb2407).
⚠️ Report is 11 commits behind head on 24_4.

Files with missing lines Patch % Lines
chancy/executors/sub.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             24_4      #46      +/-   ##
==========================================
+ Coverage   71.26%   71.31%   +0.05%     
==========================================
  Files          55       55              
  Lines        2899     2894       -5     
==========================================
- Hits         2066     2064       -2     
+ Misses        833      830       -3     
Flag Coverage Δ
unittests 71.31% <80.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TkTech
Copy link
Owner

TkTech commented Aug 6, 2025

This one was originally intentional, as significant care has to be taken when crossing process/thread/sub-interpreter barriers. But your use case is definitely valid and this is definitely safe in the async executor. I'll give the others a closer review.

@TkTech TkTech self-requested a review August 6, 2025 01:03
@TkTech TkTech added the enhancement New feature or request label Aug 6, 2025
@TkTech TkTech changed the base branch from main to 24_4 August 6, 2025 01:04
@PaulM5406
Copy link
Contributor Author

PaulM5406 commented Aug 28, 2025

Hey @TkTech, would you have the time to have another look at this PR ? May it be part of 0.24.4 ?
If not, may you add only the change of the async executor to the 0.24.4 release ?
Do you think you could release it soon ?
Thank you !

@TkTech
Copy link
Owner

TkTech commented Sep 1, 2025

#49 will release tomorrow with this supported at least for the async executor.

Could you expand on your use case for this one? Is the kwarg you want to inject related to Chancy itself, like job or queue data, or your own?

@PaulM5406
Copy link
Contributor Author

#49 will release tomorrow with this supported at least for the async executor.

Could you expand on your use case for this one? Is the kwarg you want to inject related to Chancy itself, like job or queue data, or your own?

kwargs I want to inject is not part of chancy. There are some other external services, like other DB connections.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants