Skip to content

Commit

Permalink
Fix worker break issue (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrproliu authored Aug 6, 2024
1 parent f330cdc commit 4aa9c59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion servers/simple/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def feedRawData(self, request, context):
# It should not be called
return Empty()

uris = [str(uri.name) for uri in request.unrecognizedUris]
uris = [str(uri.name) for uri in request.unrecognizedUris if uri and uri.name]
service = str(request.service)

# This is an experimental mechanism to avoid identifying non-restful uris unnecessarily.
Expand Down
2 changes: 2 additions & 0 deletions servers/simple/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ def run_worker(uri_main_queue, shared_results_object):
# increment here
counter += 1
print('-================-')
except Exception as e:
print(f"catch an unexpected error occurred: {e}")
except queue.Empty: # TODO Consider queue full
pass

0 comments on commit 4aa9c59

Please sign in to comment.