Delete send_postatus_errors cronjob.

Cron job related to the chief based deployment method. Not used in AWS.
This commit is contained in:
Giorgos Logiotatidis 2018-03-02 15:33:27 +02:00 коммит произвёл Giorgos Logiotatidis
Родитель 65c1502649
Коммит 610edb7736
12 изменённых файлов: 1 добавлений и 63 удалений

Просмотреть файл

@ -79,7 +79,6 @@ app:
dms_reload_wiki_traffic_stats: SECRET
dms_remove_expired_registration_profiles: SECRET
dms_report_employee_answers: SECRET
dms_send_postatus_errors: SECRET
dms_send_weekly_ready_for_review_digest: SECRET
dms_send_welcome_emails: SECRET
dms_survey_recent_askers: SECRET

Просмотреть файл

@ -81,7 +81,6 @@ app:
dms_reload_wiki_traffic_stats: SECRET
dms_remove_expired_registration_profiles: SECRET
dms_report_employee_answers: SECRET
dms_send_postatus_errors: SECRET
dms_send_weekly_ready_for_review_digest: SECRET
dms_send_welcome_emails: SECRET
dms_survey_recent_askers: SECRET

Просмотреть файл

@ -81,7 +81,6 @@ app:
dms_reload_wiki_traffic_stats: SECRET
dms_remove_expired_registration_profiles: SECRET
dms_report_employee_answers: SECRET
dms_send_postatus_errors: SECRET
dms_send_weekly_ready_for_review_digest: SECRET
dms_send_welcome_emails: SECRET
dms_survey_recent_askers: SECRET

Просмотреть файл

@ -81,7 +81,6 @@ app:
dms_reload_wiki_traffic_stats: SECRET
dms_remove_expired_registration_profiles: SECRET
dms_report_employee_answers: SECRET
dms_send_postatus_errors: SECRET
dms_send_weekly_ready_for_review_digest: SECRET
dms_send_welcome_emails: SECRET
dms_survey_recent_askers: SECRET

Просмотреть файл

@ -81,7 +81,6 @@ app:
dms_reload_wiki_traffic_stats: SECRET
dms_remove_expired_registration_profiles: SECRET
dms_report_employee_answers: SECRET
dms_send_postatus_errors: SECRET
dms_send_weekly_ready_for_review_digest: SECRET
dms_send_welcome_emails: SECRET
dms_survey_recent_askers: SECRET

Просмотреть файл

@ -81,7 +81,6 @@ app:
dms_reload_wiki_traffic_stats: SECRET
dms_remove_expired_registration_profiles: SECRET
dms_report_employee_answers: SECRET
dms_send_postatus_errors: SECRET
dms_send_weekly_ready_for_review_digest: SECRET
dms_send_welcome_emails: SECRET
dms_survey_recent_askers: SECRET

Просмотреть файл

@ -81,7 +81,6 @@ app:
dms_reload_wiki_traffic_stats: SECRET
dms_remove_expired_registration_profiles: SECRET
dms_report_employee_answers: SECRET
dms_send_postatus_errors: SECRET
dms_send_weekly_ready_for_review_digest: SECRET
dms_send_welcome_emails: SECRET
dms_survey_recent_askers: SECRET

Просмотреть файл

@ -40,7 +40,6 @@ data:
dms-reload-wiki-traffic-stats:
dms-remove-expired-registration-profiles:
dms-report-employee-answers:
dms-send-postatus-errors:
dms-send-weekly-ready-for-review-digest:
dms-send-welcome-emails:
dms-survey-recent-askers:

Просмотреть файл

@ -1091,7 +1091,6 @@ DMS_UPDATE_WEEKLY_VOTES = config('DMS_UPDATE_WEEKLY_VOTES', default=None)
DMS_UPDATE_SEARCH_CTR_METRIC = config('DMS_UPDATE_SEARCH_CTR_METRIC', default=None)
DMS_REMOVE_EXPIRED_REGISTRATION_PROFILES = config('DMS_REMOVE_EXPIRED_REGISTRATION_PROFILES', default=None)
DMS_UPDATE_CONTRIBUTOR_METRICS = config('DMS_UPDATE_CONTRIBUTOR_METRICS', default=None)
DMS_SEND_POSTATUS_ERRORS = config('DMS_SEND_POSTATUS_ERRORS', default=None)
DMS_AUTO_ARCHIVE_OLD_QUESTIONS = config('DMS_AUTO_ARCHIVE_OLD_QUESTIONS', default=None)
DMS_REINDEX_KB = config('DMS_REINDEX_KB', default=None)
DMS_PROCESS_EXIT_SURVEYS = config('DMS_PROCESS_EXIT_SURVEYS', default=None)

Просмотреть файл

@ -13,46 +13,3 @@ from kitsune.sumo.tasks import measure_queue_lag
def enqueue_lag_monitor_task():
"""Fires a task that measures the queue lag."""
measure_queue_lag.delay(datetime.now())
@cronjobs.register
def send_postatus_errors():
"""Looks at postatus file and sends an email with errors"""
# Gah! Don't do this on stage!
if settings.STAGE:
return
def new_section(line):
return (line.startswith('dennis ') or
line.startswith('Totals') or
line.startswith('BUSTED') or
line.startswith('COMPILED'))
# Download the postatus file
postatus = requests.get('https://support.mozilla.org/media/postatus.txt')
# Parse it to see which locales have issues
lines = postatus.content.splitlines()
datestamp = lines.pop(0)
errordata = []
while lines:
line = lines.pop(0)
if line.startswith('>>> '):
while lines and not new_section(line):
errordata.append(line)
line = lines.pop(0)
# If we have errors to send, send them
if errordata:
mail_admins(
subject='[SUMO] postatus errors %s' % datestamp,
message=(
'These are the errors in the SUMO postatus file.\n' +
'See http://postatus.paas.allizom.org/p/SUMO for details\n' +
'and bug generation links.\n\n' +
'\n'.join(errordata)
)
)

Просмотреть файл

@ -143,12 +143,6 @@ def job_update_contributor_metrics():
call_command('cron update_contributor_metrics')
@scheduled_job('cron', month='*', day='*', hour='03', minute='30', max_instances=1, coalesce=True)
@babis.decorator(ping_after=settings.DMS_SEND_POSTATUS_ERRORS)
def job_send_postatus_errors():
call_command('cron send_postatus_errors')
@scheduled_job('cron', month='*', day='*', hour='04', minute='00', max_instances=1, coalesce=True)
@babis.decorator(ping_after=settings.DMS_AUTO_ARCHIVE_OLD_QUESTIONS)
def job_auto_archive_old_questions():

Просмотреть файл

@ -71,10 +71,6 @@ SNITCHES = {
'interval': 'daily',
'tags': [],
},
'SUMO Send Postatus Errors': {
'interval': 'daily',
'tags': [],
},
'SUMO Auto Archive Old Questions': {
'interval': 'daily',
'tags': [],