mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 05:19:40 +02:00
minor changes
This commit is contained in:
parent
a3441cfcbf
commit
cb97abb2a4
1 changed files with 9 additions and 11 deletions
|
@ -102,11 +102,11 @@ class scanThread (threading.Thread):
|
|||
file_size = os.path.getsize(file)
|
||||
|
||||
# log the scan has started
|
||||
log(
|
||||
f'Scan {file_name} '
|
||||
f'[{human_readable_size(file_size)}] '
|
||||
f'Thread-{id} '
|
||||
)
|
||||
# log(
|
||||
# f'Scan {file_name} '
|
||||
# f'[{human_readable_size(file_size)}] '
|
||||
# f'Thread-{id} ')
|
||||
|
||||
file_scan_start_time = time.time()
|
||||
if is_fake_scan:
|
||||
status = "SKIPPED"
|
||||
|
@ -118,7 +118,6 @@ class scanThread (threading.Thread):
|
|||
else:
|
||||
queueLock.acquire()
|
||||
res = pandora.submit_from_disk(file)
|
||||
logging.info(f'pandora_res="{res}"')
|
||||
queueLock.release()
|
||||
|
||||
time.sleep(0.1)
|
||||
|
@ -127,16 +126,15 @@ class scanThread (threading.Thread):
|
|||
while loop < (1024 * 256):
|
||||
queueLock.acquire()
|
||||
res = pandora.task_status(res["taskId"])
|
||||
logging.info(f'pandora_res="{res}"')
|
||||
queueLock.release()
|
||||
|
||||
# Handle responde from Pandora
|
||||
if (res['success'] and (loop < 100)):
|
||||
status = res["status"]
|
||||
if (status != "WAITING"):
|
||||
break
|
||||
|
||||
# wait a little
|
||||
pass
|
||||
time.sleep(0.1)
|
||||
|
||||
loop += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue