Skip to content

Commit

Permalink
v1.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyorlando authored Aug 19, 2024
2 parents a56b2f8 + 8241042 commit 043c4c4
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.15 on 2024-08-19 21:54

import common.migrations.remove_field
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('alerts', '0055_alter_bundlednotification_alert_group'),
]

operations = [
common.migrations.remove_field.RemoveFieldState(
model_name='AlertGroup',
name='slack_log_message',
),
]
8 changes: 0 additions & 8 deletions engine/apps/alerts/models/alert_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,14 +395,6 @@ def status(self) -> int:
related_name="wiped_alert_groups",
)

# TODO: drop this column in future release
slack_log_message = models.OneToOneField(
"slack.SlackMessage",
on_delete=models.SET_NULL,
null=True,
default=None,
)

prevent_posting_alerts = models.BooleanField(default=False)
maintenance_uuid = models.CharField(max_length=100, unique=True, null=True, default=None)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.15 on 2024-08-19 21:54

from django.db import migrations

import common.migrations.remove_field


class Migration(migrations.Migration):

dependencies = [
('alerts', '0056_remove_alertgroup_slack_log_message_state'),
]

operations = [
common.migrations.remove_field.RemoveFieldDB(
model_name='AlertGroup',
name='slack_log_message',
remove_state_migration=('alerts', '0056_remove_alertgroup_slack_log_message_state'),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ def on_alert_group_action_triggered_async(log_record_id):
logger.debug(f"Finish on_alert_group_action_triggered for alert_group {alert_group_id}, log record {log_record_id}")


@shared_dedicated_queue_retry_task(
autoretry_for=(Exception,), retry_backoff=True, max_retries=1 if settings.DEBUG else None
)
def on_alert_group_update_log_report_async(alert_group_id):
return "Deprecated, will be removed after queue cleanup"


class AlertGroupSlackRepresentative(AlertGroupAbstractRepresentative):
def __init__(self, log_record):
self.log_record = log_record
Expand Down
7 changes: 0 additions & 7 deletions engine/apps/slack/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,6 @@ def populate_slack_user_identities(organization_pk):
SlackUserIdentity.objects.bulk_update(slack_user_identities_to_update, fields_to_update, batch_size=5000)


@shared_dedicated_queue_retry_task(
autoretry_for=(Exception,), retry_backoff=True, max_retries=1 if settings.DEBUG else None
)
def post_or_update_log_report_message_task(alert_group_pk, slack_team_identity_pk, update=False):
return "Deprecated, will be removed after queue cleanup"


@shared_dedicated_queue_retry_task(
autoretry_for=(Exception,), retry_backoff=True, max_retries=1 if settings.DEBUG else None
)
Expand Down
3 changes: 0 additions & 3 deletions engine/settings/celery_task_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@
"queue": "slack"
},
"apps.slack.representatives.alert_group_representative.on_alert_group_action_triggered_async": {"queue": "slack"},
# TODO: remove post_or_update_log_report_message_task and on_alert_group_update_log_report_async in subsequent PR
"apps.slack.tasks.post_or_update_log_report_message_task": {"queue": "slack"},
"apps.slack.representatives.alert_group_representative.on_alert_group_update_log_report_async": {"queue": "slack"},
# TELEGRAM
"apps.telegram.tasks.edit_message": {"queue": "telegram"},
"apps.telegram.tasks.on_create_alert_telegram_representative_async": {"queue": "telegram"},
Expand Down

0 comments on commit 043c4c4

Please sign in to comment.