Set daemon = true instead of call deaprecated setDaemon

Fixes: https://pagure.io/koji/issue/3698
This commit is contained in:
Jana Cupova 2023-02-20 09:20:55 +01:00 committed by Tomas Kopecek
parent b715e5305f
commit e2e0914eb9
2 changed files with 7 additions and 7 deletions

View file

@ -1077,7 +1077,7 @@ def start_currency_checker(session, repomgr):
subsession = session.subsession()
thread = threading.Thread(name='currencyChecker',
target=repomgr.currencyChecker, args=(subsession,))
thread.setDaemon(True)
thread.daemon = True
thread.start()
return thread
@ -1086,7 +1086,7 @@ def start_external_currency_checker(session, repomgr):
subsession = session.subsession()
thread = threading.Thread(name='currencyExternalChecker',
target=repomgr.currencyExternalChecker, args=(subsession,))
thread.setDaemon(True)
thread.daemon = True
thread.start()
return thread
@ -1095,7 +1095,7 @@ def start_regen_loop(session, repomgr):
subsession = session.subsession()
thread = threading.Thread(name='regenLoop',
target=repomgr.regenLoop, args=(subsession,))
thread.setDaemon(True)
thread.daemon = True
thread.start()
return thread
@ -1104,7 +1104,7 @@ def start_delete_loop(session, repomgr):
subsession = session.subsession()
thread = threading.Thread(name='deleteLoop',
target=repomgr.deleteLoop, args=(subsession,))
thread.setDaemon(True)
thread.daemon = True
thread.start()
return thread
@ -1113,7 +1113,7 @@ def start_rmtree_loop(session, repomgr):
subsession = session.subsession()
thread = threading.Thread(name='rmtreeLoop',
target=repomgr.rmtreeLoop, args=(subsession,))
thread.setDaemon(True)
thread.daemon = True
thread.start()
return thread

View file

@ -850,7 +850,7 @@ class VMExecTask(BaseTaskHandler):
self.server.register_function(self.verifyChecksum)
thr = threading.Thread(name='task_%s_thread' % self.id,
target=self.server.handle_while_active)
thr.setDaemon(True)
thr.daemon = True
thr.start()
def handler(self, name, task_info, opts=None):
@ -962,7 +962,7 @@ class VMTaskManager(TaskManager):
self.server.register_function(self.registerVM)
self.server.register_function(self.getPort)
thr = threading.Thread(name='manager_thread', target=self.server.handle_while_active)
thr.setDaemon(True)
thr.daemon = True
thr.start()
def getCloneDisks(self, vm):