UST-QuAntiL / qhana-backend

The new REST backend for QHAna (see also qhana-plugin-runner)
Apache License 2.0
1 stars 2 forks source link

Error in result watcher scheduling logic #32

Open krebsni opened 2 years ago

krebsni commented 2 years ago

The result watcher is trying to check the task result for saved task result. In addition, it seems like the task result is unscheduled twice (or at least the function that does the unscheduling and prints out the success message is called twice). Only happens sometimes

Tested with Docker and MariaDB

qhana-backend-backend-1  | time = 2022-09-15T08:21:59.408Z level = INFO module = qhana/qhana_backend message = "Unschedule watcher 3 after result was saved."
qhana-backend-backend-1  | time = 2022-09-15T08:21:59.411Z level = INFO module = qhana/qhana_backend message = "Unscheduled watcher for step 3. JobId: {\"id\":251354}"
qhana-backend-backend-1  | time = 2022-09-15T08:21:59.475Z level = INFO module = qhana/qhana_backend message = "Unschedule watcher 3 after result was saved."
qhana-backend-backend-1  | time = 2022-09-15T08:21:59.485Z level = ERROR module = qhana/qhana_backend message = "Failed to check task result." error = "Invalid job id: 251354" stackTrace = [
"callableName: externUnscheduleJob moduleName: ballerina.task.2 fileName: scheduler.bal lineNumber: 170",
"callableName: unscheduleJob moduleName: ballerina.task.2 fileName: scheduler.bal lineNumber: 94",
"callableName: unschedule moduleName: qhana.qhana_backend.0.ResultWatcher fileName: result-watcher.bal lineNumber: 567",
"callableName: checkTaskResult moduleName: qhana.qhana_backend.0.ResultWatcher fileName: result-watcher.bal lineNumber: 589",
"callableName: execute moduleName: qhana.qhana_backend.0.ResultWatcher fileName: result-watcher.bal lineNumber: 441"]