summaryrefslogtreecommitdiff
path: root/src/backend/recoverdb.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-30 14:39:00 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-10-30 14:39:00 +0000
commit93e836bbb49430929f7d827a9eb62246dd809f4c (patch)
treeaed2ed89b8043c83ca1c9e2c69a6a1fa41ccd8be /src/backend/recoverdb.py
parent1bb1eb3216267a8b9b1b9c25e163f76ba8072799 (diff)
move recoverDatabase -> recoverdb
Diffstat (limited to 'src/backend/recoverdb.py')
-rw-r--r--src/backend/recoverdb.py20
1 files changed, 20 insertions, 0 deletions
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()