Fix the query tool issue 'pgAdminThread' object has no attribute 'native_id'. #6660
parent
f399b30605
commit
c72e2f159d
|
@ -920,7 +920,9 @@ def poll(trans_id):
|
|||
is_thread_alive = False
|
||||
if trans_obj.get_thread_native_id():
|
||||
for thread in threading.enumerate():
|
||||
if thread.native_id == trans_obj.get_thread_native_id() and\
|
||||
_native_id = thread.native_id if hasattr(thread, 'native_id'
|
||||
) else thread.ident
|
||||
if _native_id == trans_obj.get_thread_native_id() and\
|
||||
thread.is_alive():
|
||||
is_thread_alive = True
|
||||
break
|
||||
|
|
|
@ -162,7 +162,9 @@ class StartRunningQuery:
|
|||
current_app._get_current_object())
|
||||
)
|
||||
_thread.start()
|
||||
trans_obj.set_thread_native_id(_thread.native_id)
|
||||
_native_id = _thread.native_id if hasattr(_thread, 'native_id'
|
||||
) else _thread.ident
|
||||
trans_obj.set_thread_native_id(_native_id)
|
||||
StartRunningQuery.save_transaction_in_session(session_obj,
|
||||
trans_id, trans_obj)
|
||||
|
||||
|
|
Loading…
Reference in New Issue