-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add background job queue and restart failed jobs during startup
In order to differentiate foreground tasks from background tasks, a separate background job queue is added. When the plugin is loaded, it will immediately restart any failed background tasks. No frontend integration is added here, but the idea is that the frontend will query both the foreground and background queues for completion and update the UI as needed.
- Loading branch information
1 parent
ea80102
commit 8d01030
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
__version__ = "6.16.0" | ||
|
||
default_app_config = "kolibri_explore_plugin.apps_config.ExploreConfig" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ExploreConfig(AppConfig): | ||
name = "kolibri_explore_plugin" | ||
label = "explore" | ||
|
||
def ready(self): | ||
from .tasks import restart_failed_background_jobs | ||
|
||
restart_failed_background_jobs() |
This file contains 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