Created
November 6, 2020 19:12
-
-
Save gilsonbp/4e1cca9e0e4e263099399939470cbfbe to your computer and use it in GitHub Desktop.
Atualiza o campo notification_channel com um canal do Slack para enviar as notificações
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Seleciona as filas que deseja alterar: | |
queues = SQSQueue.objects.filter( | |
name__in=["dead__products_api__seller_product_moderation__approved", "products_api__seller_product_moderation__approved"] | |
) | |
# Faz um loop na lista atualizando o campo notification_channel | |
for queue in queues: | |
if not queue.notification_channel: # Verifica se a fila já não tem um outro canal do slack | |
queue.notification_channel = "tech-alerts-queues-catalog" | |
queue.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment