mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
tornado: Merge the TORNADO_SERVER and TORNADO_PORTS configs.
Having both of these is confusing; TORNADO_SERVER is used only when there is one TORNADO_PORT. Its primary use is actually to be _unset_, and signal that in-process handling is to be done. Rename to USING_TORNADO, to parallel the existing USING_RABBITMQ, and switch the places that used it for its contents to using TORNADO_PORTS.
This commit is contained in:
committed by
Tim Abbott
parent
4b3121db0b
commit
e5f62d083e
@@ -62,7 +62,7 @@ def request_event_queue(user_profile: UserProfile, user_client: Client, apply_ma
|
||||
narrow: Iterable[Sequence[str]]=[],
|
||||
bulk_message_deletion: bool=False) -> Optional[str]:
|
||||
|
||||
if not settings.TORNADO_SERVER:
|
||||
if not settings.USING_TORNADO:
|
||||
return None
|
||||
|
||||
tornado_uri = get_tornado_uri(user_profile.realm)
|
||||
@@ -89,7 +89,7 @@ def request_event_queue(user_profile: UserProfile, user_client: Client, apply_ma
|
||||
return resp.json()['queue_id']
|
||||
|
||||
def get_user_events(user_profile: UserProfile, queue_id: str, last_event_id: int) -> List[Dict[str, Any]]:
|
||||
if not settings.TORNADO_SERVER:
|
||||
if not settings.USING_TORNADO:
|
||||
return []
|
||||
|
||||
tornado_uri = get_tornado_uri(user_profile.realm)
|
||||
@@ -108,7 +108,7 @@ def get_user_events(user_profile: UserProfile, queue_id: str, last_event_id: int
|
||||
return resp.json()['events']
|
||||
|
||||
def send_notification_http(realm: Realm, data: Mapping[str, Any]) -> None:
|
||||
if not settings.TORNADO_SERVER or settings.RUNNING_INSIDE_TORNADO:
|
||||
if not settings.USING_TORNADO or settings.RUNNING_INSIDE_TORNADO:
|
||||
process_notification(data)
|
||||
else:
|
||||
tornado_uri = get_tornado_uri(realm)
|
||||
|
||||
Reference in New Issue
Block a user