Skip to content

Commit 8f561f9

Browse files
committed
fix(mapping): remove duplicate slack error notifications
The job management decorator already calls send_slack_error for both FAILED and ERRORED outcomes. Calling it again inside the job's own exception handlers caused every mapping failure to produce two Slack messages for the same error.
1 parent f5dc0f8 commit 8f561f9

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

  • src/mavedb/worker/jobs/variant_processing

src/mavedb/worker/jobs/variant_processing/mapping.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
)
2424
from mavedb.lib.logging.context import format_raised_exception_info_as_dict
2525
from mavedb.lib.mapping import ANNOTATION_LAYERS, EXCLUDED_PREMAPPED_ANNOTATION_KEYS
26-
from mavedb.lib.slack import send_slack_error
2726
from mavedb.lib.types.workflow import JobExecutionOutcome
2827
from mavedb.lib.variants import get_hgvs_from_post_mapped
2928
from mavedb.models.enums.annotation_type import AnnotationType
@@ -275,7 +274,6 @@ async def map_variants_for_score_set(ctx: dict, job_id: int, job_manager: JobMan
275274
job_manager.db.flush()
276275

277276
except (NonexistentMappingResultsError, NonexistentMappingScoresError, NonexistentMappingReferenceError) as e:
278-
send_slack_error(e)
279277
logging_context = {**job_manager.logging_context(), **format_raised_exception_info_as_dict(e)}
280278
logger.error(msg="Known error during variant mapping.", extra=logging_context)
281279

@@ -302,7 +300,6 @@ async def map_variants_for_score_set(ctx: dict, job_id: int, job_manager: JobMan
302300
)
303301

304302
except Exception as e:
305-
send_slack_error(e)
306303
logging_context = {**job_manager.logging_context(), **format_raised_exception_info_as_dict(e)}
307304
logger.error(msg="Encountered an unexpected error while parsing mapped variants.", extra=logging_context)
308305

0 commit comments

Comments
 (0)