Compare commits

..

4 Commits

2 changed files with 58 additions and 47 deletions

View File

@ -260,6 +260,15 @@ class PublishDispatcher:
False,
False,
)
async with self.pool.acquire() as log_connection:
await log_connection.set_type_codec(
'json',
encoder=dumps,
decoder=loads,
schema='pg_catalog'
)
async with log_connection.transaction():
risotto_context.log_connection = log_connection
async with self.pool.acquire() as connection:
await connection.set_type_codec(
'json',

View File

@ -64,10 +64,12 @@ class Logger:
d = {}
for key, value in row.items():
if key == 'data':
if not value:
if isinstance(value, dict):
pass
elif not value:
value = {}
# else:
# value = loads(value)
else:
value = loads(value)
elif key in ['start_date', 'stop_date']:
value = str(value)
d[key] = value