mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
Refactor process configuration
This commit is contained in:
parent
1404464ef9
commit
e0de964fda
1 changed files with 10 additions and 5 deletions
|
@ -263,6 +263,15 @@ def configure_logging():
|
||||||
print('No log folder, logging to screen only')
|
print('No log folder, logging to screen only')
|
||||||
|
|
||||||
|
|
||||||
|
def configure_process():
|
||||||
|
global MYAPP
|
||||||
|
|
||||||
|
MYAPP = RunningProcess()
|
||||||
|
while MYAPP.alreadyrunning():
|
||||||
|
print('Waiting for existing session to end')
|
||||||
|
time.sleep(30)
|
||||||
|
|
||||||
|
|
||||||
def initialize(section=None):
|
def initialize(section=None):
|
||||||
global NZBGET_POSTPROCESS_ERROR, NZBGET_POSTPROCESS_NONE, NZBGET_POSTPROCESS_PAR_CHECK, NZBGET_POSTPROCESS_SUCCESS, \
|
global NZBGET_POSTPROCESS_ERROR, NZBGET_POSTPROCESS_NONE, NZBGET_POSTPROCESS_PAR_CHECK, NZBGET_POSTPROCESS_SUCCESS, \
|
||||||
NZBTOMEDIA_TIMEOUT, FORKS, FORK_DEFAULT, FORK_FAILED_TORRENT, FORK_FAILED, NOEXTRACTFAILED, SHOWEXTRACT, \
|
NZBTOMEDIA_TIMEOUT, FORKS, FORK_DEFAULT, FORK_FAILED_TORRENT, FORK_FAILED, NOEXTRACTFAILED, SHOWEXTRACT, \
|
||||||
|
@ -287,11 +296,7 @@ def initialize(section=None):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
configure_logging()
|
configure_logging()
|
||||||
|
configure_process()
|
||||||
MYAPP = RunningProcess()
|
|
||||||
while MYAPP.alreadyrunning():
|
|
||||||
print('Waiting for existing session to end')
|
|
||||||
time.sleep(30)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, '')
|
locale.setlocale(locale.LC_ALL, '')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue