Deepomatic / deepomatic-client-python

Python Client
Other
14 stars 0 forks source link

Debug log on task refresh are somewhat misleading #59

Open thomas-riccardi opened 5 years ago

thomas-riccardi commented 5 years ago
DEBUG:deepomatic.api.resources.task:Refreshing Task <Task object id=343279235 at 0x7fdbac121908> JSON: {
    "error": null,
    "id": "343279235",
    "data": null,
}

this log is strange: we log the full old state just before refreshing, but not after refreshing. I would expect the reverse (or maybe both): just DEBUG:deepomatic.api.resources.task:Refreshing Task 343279235... with no json. then after refresh DEBUG:deepomatic.api.resources.task:Task 343279235 refreshed : <Task object id=343279235 at 0x7fdbac121908> JSON {...}

Also:

thomas-riccardi commented 5 years ago

The retry DEBUG logs are also hard to read when multiple task.wait() are run in parallel (multithread, later gevent...):

DEBUG:deepomatic.api.utils:Starting call to 'deepomatic.api.resources.task.Task._refresh_status', this is the 2nd time calling it.

=> a task id there if possible would help a lot !