diff --git a/CHANGELOG.md b/CHANGELOG.md index 58b813e..51c79db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - 💄 — Better mobile display - ✨ — Add waiting tasks count on index page and app API - ✨ — Allow to customize the name of the argos agent +- 🩹 — Fix tasks_tmp table truncating ## 0.9.0 diff --git a/argos/server/queries.py b/argos/server/queries.py index 940ed35..4e6da5a 100644 --- a/argos/server/queries.py +++ b/argos/server/queries.py @@ -568,9 +568,8 @@ async def update_from_config(db: Session, config: schemas.Config): db.commit() else: logger.debug("Truncating tasks_tmp table") - db.execute( - sa_text("TRUNCATE TABLE tasks_tmp;").execution_options(autocommit=True) - ) + db.execute(sa_text("TRUNCATE TABLE tasks_tmp RESTART IDENTITY;")) + db.commit() return { "added": added_tasks,