Skip to content

Commit

Permalink
Stacktrace added to error messages in task manager
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzevaka committed Oct 3, 2023
1 parent eae8e18 commit d6ae996
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cloudblueconnect/connect-extension-runner:29.0
FROM cloudblueconnect/connect-extension-runner:29.2

COPY pyproject.toml /install_temp/.
COPY poetry.* /install_temp/.
Expand Down
7 changes: 5 additions & 2 deletions connect_ext_ppr/tasks_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ def apply_ppr_and_delegate_to_marketplaces(
:rtype bool
:raises TaskException
"""

return True

dr_marketplaces = db.query(MarketplaceConfiguration).filter_by(
active=True,
deployment_request_id=deployment_request.id,
Expand Down Expand Up @@ -421,7 +424,7 @@ def execute_tasks(db, config, tasks, connect_client, logger):
was_succesfull = False
task.error_message = str(ex)[:4000]
except Exception as ex:
logger.error(f'Task ID: {task.id} - {ex}')
logger.exception(f'Task ID: {task.id} - {ex}')
was_succesfull = False
task.error_message = 'Something went wrong.'

Expand Down Expand Up @@ -466,7 +469,7 @@ def main_process(deployment_request_id, config, connect_client, logger):
was_succesfull = execute_tasks(db, config, tasks, connect_client, logger)
except Exception as ex:
was_succesfull = False
logger.error(f'DeploymentRequest ID: {deployment_request_id} - {ex}')
logger.exception(f'DeploymentRequest ID: {deployment_request_id} - {ex}')

db.refresh(deployment_request, with_for_update=True)

Expand Down

0 comments on commit d6ae996

Please sign in to comment.