Skip to content

Commit 030eeb7

Browse files
authored
chore: sync staging and main - #989 - #991
## Descrição das Alterações Este Pull Request tem como objetivo atualizar a branch atual com as últimas alterações da branch main, garantindo que a base de código esteja alinhada com as mudanças mais recentes.
2 parents 2d91cab + 423fd42 commit 030eeb7

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

backend/apps/core/management/commands/_disable_unhealthy_flow_schedules/service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def disable_unhealthy_flow_schedules(self) -> None:
7676

7777
if flows_to_disable:
7878
for flow in flows_to_disable:
79-
self.set_flow_schedule(flow_id=flow.id, active=False)
79+
for _ in range(2): # Existe um bug onde o Flow não desativa com apenas uma query
80+
self.set_flow_schedule(flow_id=flow.id, active=False)
8081

8182
message_parts = [
8283
self.format_flows("🚨 Flows em alerta", flows),

backend/apps/user_notifications/management/commands/send_notification.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414

1515
def check_for_updates(subscription: TableUpdateSubscription) -> TableUpdateSubscription | bool:
1616
table = subscription.table
17-
18-
if subscription.updated_at < table.last_updated_at:
19-
return subscription
20-
return False
17+
try:
18+
if subscription.updated_at < table.last_updated_at:
19+
return subscription
20+
return False
21+
except Exception:
22+
print(f"Tabela: {table.dataset.name}{table.name} está com erro")
23+
return False
2124

2225

2326
def send_update_notification_email(user: Account, subscriptions: list, date_today: dj_timezone):

0 commit comments

Comments
 (0)