From 3de4059f85a646dfa9cb93c2e91e096b20ad17fc Mon Sep 17 00:00:00 2001 From: Krateng Date: Wed, 2 Dec 2020 19:18:12 +0100 Subject: [PATCH] Fixed database maintenance, GH-59 --- maloja/apis/native_v1.py | 2 +- maloja/proccontrol/tasks/fixexisting.py | 2 +- maloja/web/static/txt/robots.txt | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/maloja/apis/native_v1.py b/maloja/apis/native_v1.py index 667c3cd..f2796ae 100644 --- a/maloja/apis/native_v1.py +++ b/maloja/apis/native_v1.py @@ -257,7 +257,7 @@ def import_rulemodule(**keys): def rebuild(**keys): log("Database rebuild initiated!") sync() - from .proccontrol.tasks.fixexisting import fix + from ..proccontrol.tasks.fixexisting import fix fix() global cla, coa cla = CleanerAgent() diff --git a/maloja/proccontrol/tasks/fixexisting.py b/maloja/proccontrol/tasks/fixexisting.py index c659239..409918f 100644 --- a/maloja/proccontrol/tasks/fixexisting.py +++ b/maloja/proccontrol/tasks/fixexisting.py @@ -65,7 +65,7 @@ def fix(): with open(os.path.join(patchfolder,filename + ".diff"),"w") as patchfile: 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!") diff --git a/maloja/web/static/txt/robots.txt b/maloja/web/static/txt/robots.txt index 5023f2b..a4751e2 100644 --- a/maloja/web/static/txt/robots.txt +++ b/maloja/web/static/txt/robots.txt @@ -1,4 +1,2 @@ User-agent: * -Disallow: /api/ -Disallow: /pulse/ -Disallow: /performance/ +Disallow: *