Commit Graph

11206 Commits

Author SHA1 Message Date
Oliver
4ae86c8c14 Reject triggered events when running special commands 2022-01-10 20:12:43 +11:00
Oliver
c848ca8d44 Handle errors when offloading tasks 2022-01-10 20:04:36 +11:00
Oliver
0a40c253a5 Do not fire events for some tables 2022-01-10 19:56:43 +11:00
Oliver
1243923944 Event refactoring 2022-01-10 17:28:44 +11:00
Oliver
886b1f1d72 Simplify event triggering
- add generic receivers for database actions
- exclude django_q tables, otherwise we get an infinite loop!

Ref: https://stackoverflow.com/questions/17507784/consolidating-multiple-post-save-signals-with-one-receiver/32230933#32230933
2022-01-10 17:24:53 +11:00
Oliver
4ddd6bc351 Adds more triggered events for stock models 2022-01-10 09:16:18 +11:00
Oliver
67aac9c373 Add triggere events for the "company" app 2022-01-10 09:07:30 +11:00
Oliver
13d8bf437a PEP fixes 2022-01-10 09:02:11 +11:00
Oliver
2370e41961 Add multiple triggered events for the "order" app 2022-01-10 09:01:17 +11:00
Oliver
5acd880f39 Fix for triggered events 2022-01-10 08:54:11 +11:00
Oliver
936330d3d2 Add more triggered events 2022-01-09 23:07:12 +11:00
Oliver
e891e0a2b9 typo fix 2022-01-09 23:02:24 +11:00
Oliver
d765be8c73 Iterate through plugins in a separate background task 2022-01-09 22:58:59 +11:00
Oliver
3731d688c9 Refactor behaviour of "event" mixin:
- Trigger a new background task for each plugin
- Call plugin.process_event
- Plugin class can then decide what to do with the particular event
2022-01-09 22:52:28 +11:00
Oliver
af1bfb2f87 Merge remote-tracking branch 'inventree/master' into triggers 2022-01-09 08:15:47 +11:00
Oliver
63ed59ebcf
Merge pull request #2517 from SchrodingersGat/build-complete-fix
Fix messaging in build complete dialog
2022-01-09 08:12:52 +11:00
Oliver
d8057e88e7 Fix messaging in build complete dialg 2022-01-09 07:50:08 +11:00
Oliver
ff7a75266b Fixes for stock location forms 2022-01-08 20:28:57 +11:00
Oliver
af18d16d98 Tweak admin area icon 2022-01-08 20:19:18 +11:00
Oliver
77decc72ed Extra bug fix for part variant form 2022-01-08 20:07:54 +11:00
Oliver
137a668452 Remove duplicated settings display 2022-01-08 13:29:13 +11:00
Oliver
9e2250e9b8 Bug fixes for settings 2022-01-08 13:19:16 +11:00
Oliver
04d25a60b0 Adds sample plugin which responds to triggered events
- Adds some example trigger events for the "Part" model
2022-01-08 09:07:27 +11:00
Oliver
a604d85f0f Move events.py to the plugin app 2022-01-07 22:35:54 +11:00
Oliver
63eb49777a Add mixin class to respond to internal events 2022-01-07 22:29:19 +11:00
Oliver
8ff3bf1ad1 Adds a new setting to enable event responses 2022-01-07 21:53:42 +11:00
Oliver
1e5ecb13f0 Add code for triggering and responding to events 2022-01-07 21:48:17 +11:00
Oliver
4a5e4a88ac
Merge pull request #2509 from matmair/plugin-install
Plugin install
2022-01-07 20:19:47 +11:00
Matthias
220bf0db3a
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-install 2022-01-07 08:57:04 +01:00
Oliver
31ea7e2792
Merge pull request #2512 from SchrodingersGat/mixins
Adds "scheduled task" mixin for plugins
2022-01-07 18:25:47 +11:00
Oliver Walters
8efd45f0ad log warning message if db not ready 2022-01-07 18:00:38 +11:00
Oliver Walters
668e2bfcd5 Further error catching 2022-01-07 17:20:57 +11:00
Oliver Walters
103dfaa2a5 try/catch for operational error
- Database might not yet be ready to load models
2022-01-07 17:11:53 +11:00
Oliver Walters
c04e07c1fa Add a task which fails on purpose 2022-01-07 17:04:33 +11:00
Oliver Walters
36feef6558 Remove log message if not relevent 2022-01-07 16:53:51 +11:00
Oliver Walters
3eb1fa32f9 Scheduled tasks get registered for the background worker 2022-01-07 16:51:00 +11:00
Oliver Walters
ff598a22ff bug fix : correct setting name when changing a 'requires restart' setting 2022-01-07 16:20:16 +11:00
Oliver Walters
0ab9b2dbc7 Bug fix - always allow plugins to register settings 2022-01-07 15:42:20 +11:00
Oliver Walters
794a9e75e8 Add validation for scheduled tasks defined by a plugin 2022-01-07 15:37:43 +11:00
Oliver Walters
326b897d14 Revert "Move mixins.py into main plugin directory"
This reverts commit 8103b84268.
2022-01-07 14:54:12 +11:00
Oliver Walters
0773545615 Add "ScheduleMixin" for scheduling tasks 2022-01-07 14:54:04 +11:00
Oliver Walters
8103b84268 Move mixins.py into main plugin directory 2022-01-07 14:23:32 +11:00
Oliver
7967c0c0bd
Merge pull request #2492 from SchrodingersGat/plugin-settings-refactor
Plugin settings refactor
2022-01-07 14:12:22 +11:00
Oliver
a1f51a8e92
Merge pull request #2495 from matmair/stale
Mark stale PRs / issues
2022-01-07 13:56:18 +11:00
Oliver
35561b46ef
Merge pull request #2511 from SchrodingersGat/table-pagination-fix
Customize text if totalRows not known
2022-01-07 13:44:48 +11:00
Oliver Walters
aaf35e6c76 Customize text if totalRows not known 2022-01-07 13:14:47 +11:00
Oliver
c1ef9a445a
Merge pull request #2510 from SchrodingersGat/build-order-complete-improvements
Adds confirmation inputs when completing build order
2022-01-07 12:45:34 +11:00
Oliver Walters
2bb1c4ea77 Remove old forms / outdated code 2022-01-07 11:34:33 +11:00
Oliver Walters
12b3a5c9cc Validate and save the new serailizer 2022-01-07 11:33:27 +11:00
Matthias
0974ebb5cd
shield plugin package load 2022-01-07 01:10:44 +01:00