diff options
-rw-r--r-- | module/FileDatabase.py | 4 | ||||
-rwxr-xr-x | pyLoadCore.py | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py index 18c371ae8..fe1bb9f8f 100644 --- a/module/FileDatabase.py +++ b/module/FileDatabase.py @@ -337,14 +337,14 @@ class FileHandler: self.core.pullManager.addEvent(e) @change - def pushPackageToQueue(self, id): + def setPackageLocation(self, id, queue): """push package to queue""" pack = self.db.getPackage(id) e = RemoveEvent("pack", id, "collector" if not pack.queue else "queue") self.core.pullManager.addEvent(e) - pack.queue = 1 + pack.queue = queue self.db.updatePackage(pack) e = InsertEvent("pack", id, -1, "collector" if not pack.queue else "queue") diff --git a/pyLoadCore.py b/pyLoadCore.py index 40b87ab76..4e0e8cb08 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -521,7 +521,7 @@ class ServerMethods(): pass def push_package_to_queue(self, id): - self.core.files.pushPackageToQueue(id) + self.core.files.setPackageLocation(id, 1) def restart_package(self, packid): self.core.files.restartPackage(int(packid)) @@ -568,8 +568,7 @@ class ServerMethods(): def pull_out_package(self, pid): """put package back to collector""" - #@TODO implement - pass + self.core.files.setPackageLocation(pid, 0) def is_captcha_waiting(self): self.core.lastClientConnected = time.time() |