-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
difficulty/easyEasy issue (less than one day)Easy issue (less than one day)enhancementkind/cleanupTechnical debt to be addressedTechnical debt to be addressedpriority/lowIssue to solve at some pointIssue to solve at some point
Description
Currently we have very similar str and repr, notably for Task exceptions:
(Pdb) repr(task_timeout)
"TaskTimeout({'id': '348848920', 'status': 'success', 'error': None, 'date_created': '2019-10-22T12:03:16.413978+02:00', 'date_updated': '2019-10-22T12:03:16.546879+02:00', 'data': {'outputs': [{'labels': {'discarded': [], 'predicted': [{'score': 0.808144927, 'label_id': 207, 'threshold': 0.025, 'label_name': 'golden retriever'}, {'score': 0.0409193039, 'label_id': 257, 'threshold': 0.025, 'label_name': 'Great Pyrenees'}]}}]}, 'subtasks': None},)"
(Pdb) str(task_timeout)
'Timeout on task: {"id": "348848920", "status": "success", "error": null, "date_created": "2019-10-22T12:03:16.413978+02:00", "date_updated": "2019-10-22T12:03:16.546879+02:00", "data": {"outputs": [{"labels": {"discarded": [], "predicted": [{"score": 0.808144927, "label_id": 207, "threshold": 0.025, "label_name": "golden retriever"}, {"score": 0.0409193039, "label_id": 257, "threshold": 0.025, "label_name": "Great Pyrenees"}]}}]}, "subtasks": null}'
It may be better to log less things in str: maybe just the task id, status and error?
For Task we should maybe do the same: implement a shorter str.
The issue is probably the same for other resources.
Metadata
Metadata
Assignees
Labels
difficulty/easyEasy issue (less than one day)Easy issue (less than one day)enhancementkind/cleanupTechnical debt to be addressedTechnical debt to be addressedpriority/lowIssue to solve at some pointIssue to solve at some point