From 4ce4a69f5c186a162f33b23289d18f82adea58ab Mon Sep 17 00:00:00 2001 From: Blaine Jester Date: Tue, 16 Jan 2024 08:04:40 -0800 Subject: [PATCH] Fix notification update in python code --- src/android_app_plugin/kolibri_plugin.py | 3 ++- src/taskworker.py | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/android_app_plugin/kolibri_plugin.py b/src/android_app_plugin/kolibri_plugin.py index efdc566f..7a136f57 100644 --- a/src/android_app_plugin/kolibri_plugin.py +++ b/src/android_app_plugin/kolibri_plugin.py @@ -68,7 +68,8 @@ def update(self, job, orm_job, state=None, **kwargs): else: progress = -1 total_progress = -1 - TaskWorker.updateProgress( + Task.updateProgress( + orm_job.worker_extra, status.title, status.text, progress, diff --git a/src/taskworker.py b/src/taskworker.py index a4bb91cf..793d8349 100644 --- a/src/taskworker.py +++ b/src/taskworker.py @@ -11,7 +11,6 @@ def main(job_request): request_id, job_id, process_id, thread_id = job_request.split(",") - logger.info("Job request: {}".format(job_request)) logger.info( "Starting Kolibri task worker, for job {} and request {}".format( job_id, request_id @@ -19,10 +18,8 @@ def main(job_request): ) # Import this after we have initialized Kolibri - logger.info("Importing executor for job request: {}".format(job_request)) from kolibri.core.tasks.worker import execute_job # noqa: E402 - logger.info("Executing job request: {}".format(job_request)) try: execute_job( str(job_id),