mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
settings: Remove remaining DEPLOYMENT_ROLE_* code remnants.
These should have been removed when we removed Zilencer.
This commit is contained in:
@@ -286,17 +286,6 @@ class PushNotificationsWorker(QueueProcessingWorker):
|
||||
# type: (Mapping[str, Any]) -> None
|
||||
handle_push_notification(data['user_profile_id'], data)
|
||||
|
||||
def make_feedback_client():
|
||||
# type: () -> Any # Should be zulip.Client, but not necessarily importable
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '../../api'))
|
||||
import zulip
|
||||
return zulip.Client(
|
||||
client="ZulipFeedback/0.1",
|
||||
email=settings.DEPLOYMENT_ROLE_NAME,
|
||||
api_key=settings.DEPLOYMENT_ROLE_KEY,
|
||||
verbose=True,
|
||||
site=settings.FEEDBACK_TARGET)
|
||||
|
||||
# We probably could stop running this queue worker at all if ENABLE_FEEDBACK is False
|
||||
@assign_queue('feedback_messages')
|
||||
class FeedbackBot(QueueProcessingWorker):
|
||||
@@ -307,24 +296,10 @@ class FeedbackBot(QueueProcessingWorker):
|
||||
|
||||
@assign_queue('error_reports')
|
||||
class ErrorReporter(QueueProcessingWorker):
|
||||
def start(self):
|
||||
# type: () -> None
|
||||
if settings.DEPLOYMENT_ROLE_KEY:
|
||||
self.staging_client = make_feedback_client()
|
||||
self.staging_client._register(
|
||||
'forward_error',
|
||||
method='POST',
|
||||
url='deployments/report_error',
|
||||
make_request=(lambda type, report: {'type': type, 'report': ujson.dumps(report)}),
|
||||
)
|
||||
QueueProcessingWorker.start(self)
|
||||
|
||||
def consume(self, event):
|
||||
# type: (Mapping[str, Any]) -> None
|
||||
logging.info("Processing traceback with type %s for %s" % (event['type'], event.get('user_email')))
|
||||
if settings.DEPLOYMENT_ROLE_KEY:
|
||||
self.staging_client.forward_error(event['type'], event['report'])
|
||||
elif settings.ERROR_REPORTING:
|
||||
if settings.ERROR_REPORTING:
|
||||
do_report_error(event['report']['host'], event['type'], event['report'])
|
||||
|
||||
@assign_queue('slow_queries', queue_type="loop")
|
||||
|
||||
@@ -309,9 +309,6 @@ DEFAULT_SETTINGS.update({
|
||||
# Configuration for JWT auth.
|
||||
'JWT_AUTH_KEYS': {},
|
||||
|
||||
# TODO: Remove the remains of the legacy "deployment" system.
|
||||
'DEPLOYMENT_ROLE_NAME': "",
|
||||
|
||||
# https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-SERVER_EMAIL
|
||||
# Django setting for what from address to use in error emails. We
|
||||
# set this to ZULIP_ADMINISTRATOR by default.
|
||||
@@ -675,8 +672,6 @@ if EMAIL_GATEWAY_PATTERN != "":
|
||||
else:
|
||||
EMAIL_GATEWAY_EXAMPLE = ""
|
||||
|
||||
DEPLOYMENT_ROLE_KEY = get_secret("deployment_role_key")
|
||||
|
||||
########################################################################
|
||||
# STATSD CONFIGURATION
|
||||
########################################################################
|
||||
|
||||
Reference in New Issue
Block a user