Skip to content

Commit

Permalink
add cron monitor with sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Dec 17, 2024
1 parent 84c637c commit 5b7d0dd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import time

from django.db.models import Q
from sentry_sdk.crons import monitor

from lemarche.siaes.models import Siae
from lemarche.utils.apis import api_slack
Expand Down Expand Up @@ -33,6 +34,7 @@ def add_arguments(self, parser):
parser.add_argument("--siret", type=str, default=None, help="Lancer sur un Siret spécifique")
parser.add_argument("--limit", type=int, default=None, help="Limiter le nombre de structures à processer")

@monitor(monitor_slug="update-api-entreprise-fields")
def handle(self, *args, **options):
self.stdout_info("-" * 80)
self.stdout_info("Populating API Entreprise fields...")
Expand Down

0 comments on commit 5b7d0dd

Please sign in to comment.