mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 05:24:43 +00:00
FIX: (#2212) When using DDL provider, would spike CPU usage to 100%, FIX: Also fixed possible CPU spike when CDH was enabled
This commit is contained in:
parent
71af02a923
commit
d805d15120
1 changed files with 4 additions and 0 deletions
|
@ -3087,6 +3087,8 @@ def ddl_downloader(queue):
|
||||||
nval = {'status': 'Failed',
|
nval = {'status': 'Failed',
|
||||||
'updated_date': datetime.datetime.now().strftime('%Y-%m-%d %H:%M')}
|
'updated_date': datetime.datetime.now().strftime('%Y-%m-%d %H:%M')}
|
||||||
myDB.upsert('ddl_info', nval, ctrlval)
|
myDB.upsert('ddl_info', nval, ctrlval)
|
||||||
|
else:
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
def postprocess_main(queue):
|
def postprocess_main(queue):
|
||||||
while True:
|
while True:
|
||||||
|
@ -3153,6 +3155,7 @@ def worker_main(queue):
|
||||||
elif any([snstat['snatch_status'] == 'MONITOR FAIL', snstat['snatch_status'] == 'MONITOR COMPLETE']):
|
elif any([snstat['snatch_status'] == 'MONITOR FAIL', snstat['snatch_status'] == 'MONITOR COMPLETE']):
|
||||||
logger.info('File copied for post-processing - submitting as a direct pp.')
|
logger.info('File copied for post-processing - submitting as a direct pp.')
|
||||||
threading.Thread(target=self.checkFolder, args=[os.path.abspath(os.path.join(snstat['copied_filepath'], os.pardir))]).start()
|
threading.Thread(target=self.checkFolder, args=[os.path.abspath(os.path.join(snstat['copied_filepath'], os.pardir))]).start()
|
||||||
|
time.sleep(15)
|
||||||
|
|
||||||
def nzb_monitor(queue):
|
def nzb_monitor(queue):
|
||||||
while True:
|
while True:
|
||||||
|
@ -3195,6 +3198,7 @@ def nzb_monitor(queue):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.info('process error: %s' % e)
|
logger.info('process error: %s' % e)
|
||||||
|
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
def script_env(mode, vars):
|
def script_env(mode, vars):
|
||||||
#mode = on-snatch, pre-postprocess, post-postprocess
|
#mode = on-snatch, pre-postprocess, post-postprocess
|
||||||
|
|
Loading…
Reference in a new issue