mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
This is early preparation for splitting apart Tornado into a queue server and a frontend server.
13 lines
285 B
Python
13 lines
285 B
Python
current_handler_id = 0
|
|
handlers = {}
|
|
|
|
def get_handler_by_id(handler_id):
|
|
return handlers[handler_id]
|
|
|
|
def allocate_handler_id(handler):
|
|
global current_handler_id
|
|
handlers[current_handler_id] = handler
|
|
ret = current_handler_id
|
|
current_handler_id += 1
|
|
return ret
|