Reduce load on background worker#11651
Merged
SchrodingersGat merged 8 commits intoinventree:masterfrom Apr 1, 2026
Merged
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11651 +/- ##
==========================================
+ Coverage 91.44% 91.45% +0.01%
==========================================
Files 963 963
Lines 49798 49836 +38
==========================================
+ Hits 45536 45576 +40
+ Misses 4262 4260 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
matmair
reviewed
Apr 1, 2026
| set_global_setting(f'_{task_name}_SUCCESS', datetime.now().isoformat(), None) | ||
|
|
||
|
|
||
| def check_existing_task(taskname, group: str, *args, **kwargs) -> Optional[str]: |
Member
There was a problem hiding this comment.
how does this handle repeat events on the same item?
Member
Author
There was a problem hiding this comment.
The default action is to ignore duplicate events, but once the first event is complete, a new one can be added.
Also the offload_task function now has a check_duplicates argument which can be set to False to force a duplicate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces two changes to reduce the load on the background worker by removing duplicate entries:
Tasks