Skip to content

Commit 866e001

Browse files
committed
ref(apscheduler): Rename exclude_jobs to exclude_cron_jobs
Matches the option name in the rq and arq integrations.
1 parent 988ba73 commit 866e001

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎sentry_sdk/integrations/apscheduler.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
class APSchedulerIntegration(Integration):
5050
identifier = "apscheduler"
5151

52-
def __init__(self, exclude_jobs: "Optional[List[str]]" = None) -> None:
53-
self.exclude_jobs = exclude_jobs
52+
def __init__(self, exclude_cron_jobs: "Optional[List[str]]" = None) -> None:
53+
self.exclude_cron_jobs = exclude_cron_jobs
5454

5555
@staticmethod
5656
def setup_once() -> None:
@@ -290,7 +290,7 @@ def _begin_check_in(
290290
# each time. Fall back to the job name (the function name by default).
291291
has_generated_id = _GENERATED_JOB_ID.fullmatch(job.id) is not None
292292
monitor_slug = job.name if has_generated_id else job.id
293-
if match_regex_list(monitor_slug, integration.exclude_jobs):
293+
if match_regex_list(monitor_slug, integration.exclude_cron_jobs):
294294
return None
295295

296296
monitor_config = _get_monitor_config(job.trigger)

‎tests/integrations/apscheduler/test_apscheduler.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ def test_multiple_schedulers(sentry_init, capture_envelopes):
319319
assert ok_ids == in_progress_ids
320320

321321

322-
def test_exclude_jobs(sentry_init, capture_envelopes):
323-
sentry_init(integrations=[APSchedulerIntegration(exclude_jobs=["my-.*"])])
322+
def test_exclude_cron_jobs(sentry_init, capture_envelopes):
323+
sentry_init(integrations=[APSchedulerIntegration(exclude_cron_jobs=["my-.*"])])
324324
envelopes = capture_envelopes()
325325

326326
check_ins = _run_once(envelopes, CronTrigger(minute="*/5", timezone="UTC"))

0 commit comments

Comments
 (0)