refs #1112 fix bug while accessing object member

ogcore1
Natalia Serrano 2024-11-28 10:18:34 +01:00
parent 7f45c3083d
commit be1fd7d624
1 changed files with 3 additions and 3 deletions

View File

@ -190,8 +190,8 @@ class ogLiveWorker(ServerWorker):
logger.debug (f'considering thread ({k})')
if self.q:
if not q.empty():
elem['child_pid'] = q.get()
if not self.q.empty():
elem['child_pid'] = self.q.get()
logger.debug (f'queue not empty, got pid ({elem["child_pid"]})')
else:
logger.debug (f'queue empty')
@ -413,7 +413,7 @@ class ogLiveWorker(ServerWorker):
import queue
self.q = queue.Queue() ## a single queue works for us because we never have more than one long_running_job at the same time
self.thread_list[job_id] = {
'thread': ThreadWithResult (target=f, args=args),
'thread': ThreadWithResult (target=f, args=args), ## tengo que pasar self.q aqui dentro de args?
'starttime': time.time(),
'child_pid': None,
'running': True,