mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-11-08 07:51:59 +00:00
This should fix the problems with the slow_queries thing
`manage.py process_queue: error: unrecognized arguments: slow_queries`
This commit is contained in:
@@ -18,7 +18,7 @@ ADD includes/createZulipAdmin.sh /opt/createZulipAdmin.sh
|
||||
RUN rm -rf /root/zulip/puppet && \
|
||||
cp -rf /root/custom_zulip/* /root/zulip && \
|
||||
rm -rf /root/custom_zulip && \
|
||||
VOYAGER_CLASS="dockervoyager" DEPLOYMENT_TYPE="dockervoyager" ADDITIONAL_PACKAGES="python-dev python-six python-pbs" \
|
||||
VOYAGER_CLASS="zulip::dockervoyager" DEPLOYMENT_TYPE="zulip::dockervoyager" ADDITIONAL_PACKAGES="python-dev python-six python-pbs" \
|
||||
/root/zulip/scripts/setup/install && \
|
||||
chown zulip:zulip /opt/createZulipAdmin.sh && \
|
||||
apt-get -qq autoremove --purge -y && \
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env python2.7
|
||||
|
||||
"""
|
||||
Nagios plugin to check that none of our queue workers have reported errors.
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
sys.path.append('/home/zulip/deployments/current')
|
||||
from zproject import settings
|
||||
|
||||
import glob
|
||||
import os
|
||||
|
||||
wildcard = os.path.join(settings.QUEUE_ERROR_DIR, '*.errors')
|
||||
clean = True
|
||||
for fn in glob.glob(wildcard):
|
||||
print('WARNING: Queue errors logged in %s' % (fn,))
|
||||
clean = False
|
||||
|
||||
if not clean:
|
||||
sys.exit(1)
|
||||
|
||||
sys.exit(0)
|
||||
@@ -7,8 +7,8 @@ APT_OPTIONS="${APT_OPTIONS:-}"
|
||||
ADDITIONAL_PACKAGES=${ADDITIONAL_PACKAGES:-}
|
||||
# Call the default type "voyager", for docker it's "dockervoyager"
|
||||
DEPLOYMENT_TYPE="${DEPLOYMENT_TYPE:-voyager}"
|
||||
# Can be for example "dockervoyager" or voyager
|
||||
VOYAGER_CLASS="${VOYAGER_CLASS:-voyager}"
|
||||
# Can be for example "zulip::dockervoyager" or "zulip::voyager"
|
||||
VOYAGER_CLASS="${VOYAGER_CLASS:-zulip::voyager}"
|
||||
|
||||
# Assumes we've already been untarred
|
||||
|
||||
@@ -26,7 +26,7 @@ apt-get install -y puppet git python $ADDITIONAL_PACKAGES
|
||||
|
||||
mkdir -p /etc/zulip
|
||||
|
||||
echo -e "[machine]\npuppet_classes = zulip::$VOYAGER_CLASS\ndeploy_type = voyager" > /etc/zulip/zulip.conf
|
||||
echo -e "[machine]\npuppet_classes = $VOYAGER_CLASS\ndeploy_type = voyager" > /etc/zulip/zulip.conf
|
||||
/root/zulip/scripts/zulip-puppet-apply -f
|
||||
|
||||
# These server restarting bits should be moveable into puppet-land, ideally
|
||||
|
||||
@@ -11,6 +11,7 @@ import atexit
|
||||
from collections import defaultdict
|
||||
|
||||
from zerver.lib.utils import statsd
|
||||
from typing import Any, Callable
|
||||
|
||||
# This simple queuing library doesn't expose much of the power of
|
||||
# rabbitmq/pika's queuing system; its purpose is to just provide an
|
||||
@@ -19,9 +20,9 @@ from zerver.lib.utils import statsd
|
||||
class SimpleQueueClient(object):
|
||||
def __init__(self):
|
||||
self.log = logging.getLogger('zulip.queue')
|
||||
self.queues = set()
|
||||
self.channel = None
|
||||
self.consumers = defaultdict(set)
|
||||
self.queues = set() # type: Set[str]
|
||||
self.channel = None # type: Any
|
||||
self.consumers = defaultdict(set) # type: Dict[str, Set[Any]]
|
||||
self._connect()
|
||||
|
||||
def _connect(self):
|
||||
@@ -115,7 +116,7 @@ class SimpleQueueClient(object):
|
||||
|
||||
def drain_queue(self, queue_name, json=False):
|
||||
"Returns all messages in the desired queue"
|
||||
messages =[]
|
||||
messages = []
|
||||
def opened():
|
||||
while True:
|
||||
(meta, _, message) = self.channel.basic_get(queue_name)
|
||||
@@ -156,7 +157,7 @@ class TornadoQueueClient(SimpleQueueClient):
|
||||
# https://pika.readthedocs.org/en/0.9.8/examples/asynchronous_consumer_example.html
|
||||
def __init__(self):
|
||||
super(TornadoQueueClient, self).__init__()
|
||||
self._on_open_cbs = []
|
||||
self._on_open_cbs = [] # type: List[Callable[[], None]]
|
||||
|
||||
def _connect(self, on_open_cb = None):
|
||||
self.log.info("Beginning TornadoQueueClient connection")
|
||||
@@ -230,7 +231,7 @@ class TornadoQueueClient(SimpleQueueClient):
|
||||
lambda: self.channel.basic_consume(wrapped_consumer, queue=queue_name,
|
||||
consumer_tag=self._generate_ctag(queue_name)))
|
||||
|
||||
queue_client = None
|
||||
queue_client = None # type: SimpleQueueClient
|
||||
def get_queue_client():
|
||||
global queue_client
|
||||
if queue_client is None:
|
||||
|
||||
@@ -61,6 +61,9 @@ SSO_APPEND_DOMAIN = None
|
||||
# that account as "less secure":
|
||||
# https://support.google.com/mail/answer/14257.
|
||||
#
|
||||
# You can quickly test your sending email configuration using:
|
||||
# ./manage.py send_test_email username@example.com
|
||||
#
|
||||
# A common problem is hosting providers that block outgoing SMTP traffic.
|
||||
#
|
||||
# With the exception of reading EMAIL_HOST_PASSWORD from
|
||||
|
||||
@@ -144,7 +144,6 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
|
||||
'INITIAL_PASSWORD_SALT': None,
|
||||
'FEEDBACK_BOT': 'feedback@zulip.com',
|
||||
'FEEDBACK_BOT_NAME': 'Zulip Feedback Bot',
|
||||
'API_SUPER_USERS': set(),
|
||||
'ADMINS': '',
|
||||
'INLINE_IMAGE_PREVIEW': True,
|
||||
'CAMO_URI': '',
|
||||
@@ -462,12 +461,10 @@ INTERNAL_BOT_DOMAIN = "zulip.com"
|
||||
|
||||
# Set the realm-specific bot names
|
||||
for bot in INTERNAL_BOTS:
|
||||
if not bot['var_name'] in vars():
|
||||
if vars().get(bot['var_name']) is None:
|
||||
bot_email = bot['email_template'] % (INTERNAL_BOT_DOMAIN,)
|
||||
vars()[bot['var_name'] ] = bot_email
|
||||
|
||||
if EMAIL_GATEWAY_BOT not in API_SUPER_USERS:
|
||||
API_SUPER_USERS.add(EMAIL_GATEWAY_BOT)
|
||||
if EMAIL_GATEWAY_PATTERN != "":
|
||||
EMAIL_GATEWAY_EXAMPLE = EMAIL_GATEWAY_PATTERN % ("support+abcdefg",)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user