Skip to content

Commit

Permalink
fix(taskbroker): Allow overriding of Kafka server (#83866)
Browse files Browse the repository at this point in the history
Add a setting that allows overriding the Kafka server.
  • Loading branch information
evanh authored Jan 22, 2025
1 parent 45ac4ff commit 5cc42fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sentry/runner/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,23 @@ def run_taskworker(
help="The path to the function name of the task to execute",
required=True,
)
@click.option(
"--bootstrap-servers",
type=str,
help="The bootstrap servers to use for the kafka topic",
required=True,
)
def taskbroker_send_tasks(
task_function_path: str,
args: str,
kwargs: str,
repeat: int,
bootstrap_servers: str,
) -> None:
from sentry.conf.server import KAFKA_CLUSTERS
from sentry.utils.imports import import_string

KAFKA_CLUSTERS["default"]["common"]["bootstrap.servers"] = bootstrap_servers
try:
func = import_string(task_function_path)
except Exception as e:
Expand Down

0 comments on commit 5cc42fa

Please sign in to comment.