diff --git a/gantry/clients/db/insert.py b/gantry/clients/db/insert.py index 068f0fd..8a5e1e7 100644 --- a/gantry/clients/db/insert.py +++ b/gantry/clients/db/insert.py @@ -52,7 +52,10 @@ async def insert_node(db: aiosqlite.Connection, node: dict) -> int: pk = await get_node(db, node["uuid"]) if pk is None: - logger.error(f"node not inserted: {node}. data is likely missing") + logger.error( + f"node not inserted: {node}. either a duplicate insert was attempted,\ + or the insert failed due to missing data" + ) return pk @@ -66,11 +69,15 @@ async def insert_job(db: aiosqlite.Connection, job: dict) -> int: job, # if the job somehow gets added into the db (pod+id being unique) # then ignore the insert + # in this case, lastrowid will be 0 ignore=True, ) ) as cursor: if cursor.rowcount > 0: return cursor.lastrowid - logger.error(f"job not inserted: {job}. data is likely missing") + logger.error( + f"job not inserted: {job}. either a duplicate insert was attempted,\ + or the insert failed due to missing data" + ) return None