tornado: Fix populate_db failing to call send_event properly.

This isn't the right long-term fix; theoretically, send_event
shouldn't be doing anything with populate_db, but that's for later.
This commit is contained in:
Tim Abbott 2018-11-02 17:07:21 -07:00
parent 5902a573be
commit 40ff41e135
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,8 @@ from django.conf import settings
from zerver.models import Realm from zerver.models import Realm
def get_tornado_port(realm: Realm) -> int: def get_tornado_port(realm: Realm) -> int:
if settings.TORNADO_SERVER is None:
return 9993
if settings.TORNADO_PROCESSES == 1: if settings.TORNADO_PROCESSES == 1:
return int(settings.TORNADO_SERVER.split(":")[-1]) return int(settings.TORNADO_SERVER.split(":")[-1])
return 9993 return 9993