File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 22from typing import Literal
33
44import polars as pl
5+ import sentry_sdk
56from django .db import connections
67from redis .exceptions import LockError
78
@@ -125,10 +126,15 @@ def run_impl(
125126 f"rollups:{ repo_id } :{ branch } " , timeout = 300 , blocking_timeout = 2
126127 ):
127128 if impl_type == "new" or impl_type == "both" :
128- cache_rollups (repo_id , branch )
129- cache_rollups (repo_id , None )
130- if impl_type == "new" :
131- return {"success" : True }
129+ try :
130+ cache_rollups (repo_id , branch )
131+ cache_rollups (repo_id , None )
132+ if impl_type == "new" :
133+ return {"success" : True }
134+ except Exception as e :
135+ sentry_sdk .capture_exception (e )
136+ if impl_type == "new" :
137+ return {"success" : False }
132138
133139 self .run_impl_within_lock (repo_id , branch )
134140
Original file line number Diff line number Diff line change 11import logging
22from typing import Any , Literal , cast
33
4+ import sentry_sdk
45from redis import Redis
56from redis .exceptions import LockError
67from sqlalchemy .orm import Session
@@ -69,9 +70,14 @@ def run_impl(
6970 log .info ("Received process flakes task" )
7071
7172 if impl_type == "new" or impl_type == "both" :
72- process_flakes_for_repo (repo_id )
73- if impl_type == "new" :
74- return {"successful" : True }
73+ try :
74+ process_flakes_for_repo (repo_id )
75+ if impl_type == "new" :
76+ return {"successful" : True }
77+ except Exception as e :
78+ sentry_sdk .capture_exception (e )
79+ if impl_type == "new" :
80+ return {"successful" : False }
7581
7682 redis_client = get_redis_connection ()
7783 lock_name = LOCK_NAME .format (repo_id )
You can’t perform that action at this time.
0 commit comments