mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-31 13:16:38 +00:00
fix: corrected from comment from pr
This commit is contained in:
parent
9114bc6ae0
commit
d31ad487eb
|
@ -1,6 +1,5 @@
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
from subprocess import Popen, PIPE
|
|
||||||
from typing import Tuple, Iterable, IO, Any, Optional
|
from typing import Tuple, Iterable, IO, Any, Optional
|
||||||
|
|
||||||
from selfprivacy_api.utils.huey import huey
|
from selfprivacy_api.utils.huey import huey
|
||||||
|
@ -9,9 +8,9 @@ from selfprivacy_api.jobs import JobStatus, Jobs, Job
|
||||||
|
|
||||||
|
|
||||||
COMPLETED_WITH_ERROR = (
|
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."
|
CLEAR_COMPLETED = "Cleaning completed."
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,6 +24,7 @@ def run_nix_store_print_dead() -> IO[Any]:
|
||||||
"utf-8"
|
"utf-8"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def run_nix_collect_garbage() -> Optional[IO[bytes]]:
|
def run_nix_collect_garbage() -> Optional[IO[bytes]]:
|
||||||
return subprocess.Popen(
|
return subprocess.Popen(
|
||||||
["nix-store", "--gc"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT
|
["nix-store", "--gc"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT
|
||||||
|
|
Loading…
Reference in a new issue