mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-24 13:01:28 +00:00
debug: add prints to rebuild_system
This commit is contained in:
parent
97984d2644
commit
1800c8ecd7
|
@ -60,10 +60,14 @@ def set_auto_upgrade_settings(
|
||||||
|
|
||||||
def rebuild_system() -> int:
|
def rebuild_system() -> int:
|
||||||
"""Rebuild the system"""
|
"""Rebuild the system"""
|
||||||
|
print("entered system_actions.rebuild_system")
|
||||||
rebuild_result = subprocess.Popen(
|
rebuild_result = subprocess.Popen(
|
||||||
["systemctl", "start", "sp-nixos-rebuild.service"], start_new_session=True
|
["systemctl", "start", "sp-nixos-rebuild.service"], start_new_session=True
|
||||||
)
|
)
|
||||||
|
print("Called subprocess")
|
||||||
rebuild_result.communicate()[0]
|
rebuild_result.communicate()[0]
|
||||||
|
print("Communicated with subproccess, return code:")
|
||||||
|
print(rebuild_result)
|
||||||
return rebuild_result.returncode
|
return rebuild_result.returncode
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,9 @@ class SystemMutations:
|
||||||
|
|
||||||
@strawberry.mutation(permission_classes=[IsAuthenticated])
|
@strawberry.mutation(permission_classes=[IsAuthenticated])
|
||||||
def run_system_rebuild(self) -> GenericMutationReturn:
|
def run_system_rebuild(self) -> GenericMutationReturn:
|
||||||
|
print("Recieved runSystemRebuild command")
|
||||||
system_actions.rebuild_system()
|
system_actions.rebuild_system()
|
||||||
|
print("exited system_actions.rebuild_system")
|
||||||
return GenericMutationReturn(
|
return GenericMutationReturn(
|
||||||
success=True,
|
success=True,
|
||||||
message="Starting rebuild system",
|
message="Starting rebuild system",
|
||||||
|
|
Loading…
Reference in a new issue