Skip to content

ref(crons): Rename parallel field -> batched_parallel #85261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/sentry/monitors/consumers/monitor_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ def process_single(message: Message[KafkaPayload | FilteredPayload]) -> None:
class StoreMonitorCheckInStrategyFactory(ProcessingStrategyFactory[KafkaPayload]):
parallel_executor: ThreadPoolExecutor | None = None

parallel = False
batched_parallel = False
"""
Does the consumer process unrelated check-ins in parallel?
"""
Expand All @@ -1080,7 +1080,7 @@ def __init__(
max_workers: int | None = None,
) -> None:
if mode == "batched-parallel":
self.parallel = True
self.batched_parallel = True
self.parallel_executor = ThreadPoolExecutor(max_workers=max_workers)

if max_batch_size is not None:
Expand Down Expand Up @@ -1115,7 +1115,7 @@ def create_with_partitions(
commit: Commit,
partitions: Mapping[Partition, int],
) -> ProcessingStrategy[KafkaPayload]:
if self.parallel:
if self.batched_parallel:
return self.create_parallel_worker(commit)
else:
return self.create_synchronous_worker(commit)
Loading