Skip to content

Commit

Permalink
Merge pull request #114 from MOV-AI/bugfix/bp-1242
Browse files Browse the repository at this point in the history
bring semaphore from 2.3
  • Loading branch information
duartecoelhomovai authored Aug 5, 2024
2 parents 9a55a21 + 8775092 commit c0d25ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gd_node/protocols/http/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ async def middleware(self, request, handler):
except Exception as e:
LOGGER.error(e)
raise web.HTTPForbidden(reason=e.__str__())
return await handler(request)
semaphore = asyncio.Semaphore(5)
async with semaphore:
return await handler(request)


@web.middleware
Expand Down

0 comments on commit c0d25ed

Please sign in to comment.