Skip to content

Commit

Permalink
Replace deprecated setDaemon with daemon attribute #1470
Browse files Browse the repository at this point in the history
  • Loading branch information
abigailfox committed Aug 23, 2024
1 parent 1f047fc commit 1aa5f79
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pscheduler-server/pscheduler-server/daemons/archiver.raw
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ class ArchiverPoolCollection(object):
self.skim_interval = skim_time.total_seconds()
self.skimmer = threading.Thread(
target=self._skimmer)
self.skimmer.setDaemon(True)
self.skimmer.daemon = True
self.skimmer.start()


Expand Down
2 changes: 1 addition & 1 deletion pscheduler-server/pscheduler-server/daemons/ticker
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def main_program():

http_queue_worker = threading.Thread(
target=lambda: http_queue_maintainer(log))
http_queue_worker.setDaemon(True)
http_queue_worker.daemon = True
http_queue_worker.start()

# TODO: Bulletproof the SQL queries
Expand Down
2 changes: 1 addition & 1 deletion python-pscheduler/pscheduler/pscheduler/exit.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def on_graceful_exit(call):
this.exit_worker = threading.Thread(
name="Exit Worker",
target=lambda: __graceful_exit_worker())
this.exit_worker.setDaemon(True)
this.exit_worker.daemon = True
this.exit_worker.start()

#print "OGE APPENDING", call
Expand Down
4 changes: 2 additions & 2 deletions python-pscheduler/pscheduler/pscheduler/psdns.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def proc(host, family, timing_queue):

timing_queue = queue.Queue()
thread = threading.Thread(target=proc, args=(host, family, timing_queue))
thread.setDaemon(True)
thread.daemon = True
thread.start()
try:
results = timing_queue.get(True, timeout)
Expand Down Expand Up @@ -139,7 +139,7 @@ def proc(ip_addr, timing_queue):

timing_queue = queue.Queue()
thread = threading.Thread(target=proc, args=(ip, timing_queue))
thread.setDaemon(True)
thread.daemon = True
thread.start()
try:
return timing_queue.get(True, timeout)
Expand Down
4 changes: 2 additions & 2 deletions python-pscheduler/pscheduler/pscheduler/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, identifier, worker, callback=lambda i, r, d: None, debug_call
self.debug_callback = debug_callback
self.__debug("New thread")
self.thread = threading.Thread(target=self.__run)
self.thread.setDaemon(True)
self.thread.daemon = True
self.thread.start()
self.__debug("Thread started")

Expand Down Expand Up @@ -235,7 +235,7 @@ def __init__(self,
# Caller-side thread to relay results

self.relay = threading.Thread(name="%s Relay" % (name), target=self.__relay)
self.relay.setDaemon(True)
self.relay.daemon = True

self.relayed_exception = None
self.relayed_traceback = None
Expand Down

0 comments on commit 1aa5f79

Please sign in to comment.