in azure/durable_functions/models/DurableOrchestrationContext.py [0:0]
def _pretty_print_history(self) -> str:
"""Get a pretty-printed version of the orchestration's internal history."""
def history_to_string(event):
json_dict = {}
for key, val in inspect.getmembers(event):
if not key.startswith('_') and not inspect.ismethod(val):
if isinstance(val, datetime.date):
val = val.replace(tzinfo=timezone.utc).timetuple()
json_dict[key] = val
return json.dumps(json_dict)
return str(list(map(history_to_string, self._histories)))