Skip to content

Commit

Permalink
fix warmup deadlock in cherry
Browse files Browse the repository at this point in the history
  • Loading branch information
Peddle committed Oct 25, 2023
1 parent b6962c3 commit 0580ba9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions potassium/potassium.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def _create_flask_app(self):
def handle(path):
with self._sequence_number_lock:
self._sequence_number += 1

route = "/" + path
if route not in self._endpoints:
abort(404)
Expand All @@ -234,6 +235,8 @@ def handle(path):

@flask_app.route('/_k/warmup', methods=["POST"])
def warm():
with self._sequence_number_lock:
self._sequence_number += 1
res = make_response({
"warm": True,
})
Expand Down

0 comments on commit 0580ba9

Please sign in to comment.