From d31ad487eb81c71baee16754d9e1c829505062da Mon Sep 17 00:00:00 2001 From: dettlaff Date: Sun, 12 Nov 2023 01:16:04 +0400 Subject: [PATCH] fix: corrected from comment from pr --- selfprivacy_api/jobs/nix_collect_garbage.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfprivacy_api/jobs/nix_collect_garbage.py b/selfprivacy_api/jobs/nix_collect_garbage.py index 259af96..12bce80 100644 --- a/selfprivacy_api/jobs/nix_collect_garbage.py +++ b/selfprivacy_api/jobs/nix_collect_garbage.py @@ -1,6 +1,5 @@ import re import subprocess -from subprocess import Popen, PIPE from typing import Tuple, Iterable, IO, Any, Optional from selfprivacy_api.utils.huey import huey @@ -9,9 +8,9 @@ from selfprivacy_api.jobs import JobStatus, Jobs, Job COMPLETED_WITH_ERROR = ( - "We are sorry, сompleted with an error, report it to support chat" + "We are sorry, сompleted with an error, report it to support chat." ) -RESULT_WAS_NOT_FOUND_ERROR = "We are sorry, garbage collection result was not found, something went wrong, report it to support chat :(" +RESULT_WAS_NOT_FOUND_ERROR = "We are sorry, garbage collection result was not found, something went wrong, report it to support chat." CLEAR_COMPLETED = "Cleaning completed." @@ -25,6 +24,7 @@ def run_nix_store_print_dead() -> IO[Any]: "utf-8" ) + def run_nix_collect_garbage() -> Optional[IO[bytes]]: return subprocess.Popen( ["nix-store", "--gc"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT