mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 17:59:43 +02:00
refractor files and improve aria2 process killing, needs improvement
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from core.utils.data.state import state
|
||||
import threading
|
||||
|
||||
|
||||
shutdown_event = threading.Event()
|
||||
|
||||
def kill_aria2server():
|
||||
if state.aria2process:
|
||||
state.aria2process.kill()
|
||||
if state.debug:
|
||||
print("\nKilled Aria2")
|
||||
|
||||
|
||||
def closehelper():
|
||||
shutdown_event.set()
|
||||
kill_aria2server()
|
||||
Reference in New Issue
Block a user