Skip to content
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
11 changes: 11 additions & 0 deletions src/sentry/runner/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,13 @@ def taskworker_scheduler(redis_cluster: str, **options: Any) -> None:
default=5.0,
type=float,
)
@click.option(
"--future-checking-frequency",
help="How long the future checking thread in each worker child sleeps between iterations"
"to take pressure off the GIL",
default=0.1,
type=float,
)
@log_options()
@configuration
def taskworker(**options: Any) -> None:
Expand Down Expand Up @@ -239,6 +246,7 @@ def run_taskworker(
health_check_file_path: str | None,
health_check_sec_per_touch: float,
push_timeout_sec: float,
future_checking_frequency: float,
**options: Any,
) -> None:
"""
Expand Down Expand Up @@ -266,6 +274,7 @@ def run_taskworker(
grpc_port=worker_rpc_port,
push_task_timeout=push_timeout_sec,
skip_awaiting_futures=skip_awaiting_futures,
future_checking_frequency=future_checking_frequency,
)
elif batch_push_mode:
worker = BatchPushTaskWorker(
Expand All @@ -284,6 +293,7 @@ def run_taskworker(
grpc_port=worker_rpc_port,
update_in_batches=True,
skip_awaiting_futures=skip_awaiting_futures,
future_checking_frequency=future_checking_frequency,
)
else:
worker = TaskWorker(
Expand All @@ -301,6 +311,7 @@ def run_taskworker(
health_check_file_path=health_check_file_path,
health_check_sec_per_touch=health_check_sec_per_touch,
skip_awaiting_futures=skip_awaiting_futures,
future_checking_frequency=future_checking_frequency,
)
exitcode = worker.start()
raise SystemExit(exitcode)
Expand Down
Loading