1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Fixed database maintenance, GH-59

This commit is contained in:
Krateng 2020-12-02 19:18:12 +01:00
parent b9feebb064
commit 3de4059f85
3 changed files with 3 additions and 5 deletions

View File

@ -257,7 +257,7 @@ def import_rulemodule(**keys):
def rebuild(**keys): def rebuild(**keys):
log("Database rebuild initiated!") log("Database rebuild initiated!")
sync() sync()
from .proccontrol.tasks.fixexisting import fix from ..proccontrol.tasks.fixexisting import fix
fix() fix()
global cla, coa global cla, coa
cla = CleanerAgent() cla = CleanerAgent()

View File

@ -65,7 +65,7 @@ def fix():
with open(os.path.join(patchfolder,filename + ".diff"),"w") as patchfile: with open(os.path.join(patchfolder,filename + ".diff"),"w") as patchfile:
patchfile.write("\n".join(diff)) patchfile.write("\n".join(diff))
os.rename(datadir("scrobbles",filename_new),datadir("scrobbles",filename)) os.replace(datadir("scrobbles",filename_new),datadir("scrobbles",filename))
log("Database fixed!") log("Database fixed!")

View File

@ -1,4 +1,2 @@
User-agent: * User-agent: *
Disallow: /api/ Disallow: *
Disallow: /pulse/
Disallow: /performance/