From 93e836bbb49430929f7d827a9eb62246dd809f4c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Oct 2022 14:39:00 +0000 Subject: move recoverDatabase -> recoverdb --- src/backend/recoverdb.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/backend/recoverdb.py (limited to 'src/backend/recoverdb.py') diff --git a/src/backend/recoverdb.py b/src/backend/recoverdb.py new file mode 100644 index 0000000..c429340 --- /dev/null +++ b/src/backend/recoverdb.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 + +import animation +import os +import sisyphus.getfs +import sisyphus.syncDatabase + +@animation.wait('recovering databases') +def cliExec(): + if os.path.exists(sisyphus.getfs.remotePackagesCsv): + os.remove(sisyphus.getfs.remotePackagesCsv) + if os.path.exists(sisyphus.getfs.remoteDescriptionsCsv): + os.remove(sisyphus.getfs.remoteDescriptionsCsv) + if os.path.exists(sisyphus.getfs.localPackagesCsv): + os.remove(sisyphus.getfs.localPackagesCsv) + if os.path.exists(sisyphus.getfs.localDatabase): + os.remove(sisyphus.getfs.localDatabase) + + sisyphus.syncDatabase.remoteTable() + sisyphus.syncDatabase.localTable() -- cgit v1.2.3