@@ -3,7 +3,7 @@
|
||||
# Authors: Tom Kralidis <tomkralidis@gmail.com>
|
||||
# Ricardo Garcia Silva <ricardo.garcia.silva@geobeyond.it>
|
||||
#
|
||||
# Copyright (c) 2022 Tom Kralidis
|
||||
# Copyright (c) 2024 Tom Kralidis
|
||||
# (c) 2023 Ricardo Garcia Silva
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
@@ -303,9 +303,9 @@ class BaseManager:
|
||||
outputs = {
|
||||
'type': code,
|
||||
'code': code,
|
||||
'description': 'Error updating job'
|
||||
'description': f'Error executing process: {err}'
|
||||
}
|
||||
LOGGER.error(err)
|
||||
LOGGER.exception(err)
|
||||
job_metadata = {
|
||||
'job_end_datetime': datetime.utcnow().strftime(
|
||||
DATETIME_FORMAT),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Authors: Tom Kralidis <tomkralidis@gmail.com>
|
||||
#
|
||||
# Copyright (c) 2022 Tom Kralidis
|
||||
# Copyright (c) 2024 Tom Kralidis
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation
|
||||
@@ -102,13 +102,13 @@ class DummyManager(BaseManager):
|
||||
jfmt, outputs = processor.execute(data_dict)
|
||||
current_status = JobStatus.successful
|
||||
self._send_success_notification(subscriber, outputs)
|
||||
except Exception:
|
||||
except Exception as err:
|
||||
outputs = {
|
||||
'code': 'InvalidParameterValue',
|
||||
'description': 'Error updating job'
|
||||
'description': f'Error executing process: {err}'
|
||||
}
|
||||
current_status = JobStatus.failed
|
||||
LOGGER.exception('Process failed')
|
||||
LOGGER.exception(err)
|
||||
self._send_failed_notification(subscriber)
|
||||
job_id = str(uuid.uuid1())
|
||||
return job_id, jfmt, outputs, current_status, response_headers
|
||||
|
||||
@@ -284,7 +284,7 @@ def test_execute_process(config, api_):
|
||||
assert code == HTTPStatus.BAD_REQUEST
|
||||
assert 'Location' in rsp_headers
|
||||
assert data['code'] == 'InvalidParameterValue'
|
||||
assert data['description'] == 'Error updating job'
|
||||
assert data['description'].startswith('Error executing process: ')
|
||||
|
||||
cleanup_jobs.add(tuple(['hello-world',
|
||||
rsp_headers['Location'].split('/')[-1]]))
|
||||
@@ -296,7 +296,7 @@ def test_execute_process(config, api_):
|
||||
assert code == HTTPStatus.BAD_REQUEST
|
||||
assert 'Location' in rsp_headers
|
||||
assert data['code'] == 'InvalidParameterValue'
|
||||
assert data['description'] == 'Error updating job'
|
||||
assert data['description'].startswith('Error executing process: ')
|
||||
|
||||
cleanup_jobs.add(tuple(['hello-world',
|
||||
rsp_headers['Location'].split('/')[-1]]))
|
||||
|
||||
Reference in New Issue
Block a user