Skip to content

Commit

Permalink
Merge pull request #175 from atlanticwave-sdx/33.cpu-usage
Browse files Browse the repository at this point in the history
Avoid a busy wait
  • Loading branch information
sajith authored Jul 26, 2023
2 parents 82dca91 + fae1104 commit 0600498
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions swagger_server/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ def start_consumer(thread_queue, db_instance):
manager.add_topology(topo_json)

while True:
if thread_queue.empty():
continue

# Queue.get() will block until there's an item in the queue.
msg = thread_queue.get()
logger.debug("MQ received message:" + str(msg))

Expand Down

0 comments on commit 0600498

Please sign in to comment.