2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-28 03:49:20 +00:00

Offload build output functions: (#11990)

* Offload build output functions:

- cancel output
- scrap output
- complete output

Perform these in the background worker, and monitor for progress on the frontend.

* Refactor "build cancel"

- Offload expensive ops to background worker

* Offload build complete task

* Remove @atomic decorator from functions

- Allows operations to be performed "incrementally"
- If one task times out, the next task will get the rest

* Bug fix

* Bump API version

* Fix isInTestMode check

* Handle case where task returns immediately

* Fix docstring

* fix test_api

* Tweak order of operations

* additional unit testing for further coverage

* Adjust unit tests

* Offload order completion tasks

* Remove bad code

* Updated playwright test

* Robustify playwright tests

* Bump number of allowed queries

* Revert "Remove bad code"

This reverts commit 3a3ac3bdc7.

* Revert "Offload order completion tasks"

This reverts commit 6066dabe43.
This commit is contained in:
Oliver
2026-05-24 09:26:43 +10:00
committed by GitHub
parent 7d61203be8
commit 749c4715ee
12 changed files with 739 additions and 196 deletions
+1
View File
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- [#11990](https://github.com/inventree/InvenTree/pull/11990) build output operations performed via the API now offload the work to a background task, and now return a task ID which can be used to monitor the progress of the task. This allows for better performance and responsiveness when performing build output operations, as the work is performed asynchronously in the background.
- [#11825](https://github.com/inventree/InvenTree/pull/11825) adds a new "bom" ruleset and associated permissions for BOM management, separate from the "part" ruleset which remains focused on part management. This allows for more granular control over user permissions, allowing users to have different levels of access to part management and BOM management functionality.
- [#11816](https://github.com/inventree/InvenTree/pull/11816) makes the `issued_by` field on the `Build` API read only, and instead sets the `issued_by` field to the current user when a build is created. This change was made to ensure that the `issued_by` field accurately reflects the user who created the build, and to prevent users from setting this field to an arbitrary value when creating or updating a build.