From 4befd1872f2e9baabc7dc78f1a4f91a2606144b6 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Wed, 31 Aug 2022 18:27:57 +0300 Subject: [PATCH] Add clear all states function --- src/fmn_states_db.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fmn_states_db.py b/src/fmn_states_db.py index 7210ea1..3b8e5fe 100644 --- a/src/fmn_states_db.py +++ b/src/fmn_states_db.py @@ -33,3 +33,9 @@ def remove_state(key): conn.commit() logger.warning(f'Удален стейт {key}') + +def clear_all_states(): + c.execute("DELETE FROM states") + conn.commit() + logger.warning(f'Все стейты удалены') +