Skip to content

Commit d78a8f3

Browse files
fix KeyError: 'updated' when jobs are started but haven't been updated yet (#1947)
[2025-02-28T12:42:14Z] {/usr/local/lib/python3.10/dist-packages/flask/app.py:875} ERROR - Exception on /jobs [GET] Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1511, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 919, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.10/dist-packages/flask_cors/extension.py", line 194, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 917, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 902, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] File "/pygeoapi/pygeoapi/flask_app.py", line 425, in get_jobs return execute_from_flask(processes_api.get_jobs, request) File "/pygeoapi/pygeoapi/flask_app.py", line 148, in execute_from_flask headers, status, content = api_function(actual_api, api_request, *args) File "/pygeoapi/pygeoapi/api/processes.py", line 314, in get_jobs 'updated': job_['updated'] KeyError: 'updated'
1 parent a7f7e63 commit d78a8f3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pygeoapi/process/manager/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ def execute_process(
434434
'process_id': process_id,
435435
'created': get_current_datetime(),
436436
'started': get_current_datetime(),
437+
'updated': get_current_datetime(),
437438
'finished': None,
438439
'status': current_status.value,
439440
'location': None,

0 commit comments

Comments
 (0)