Skip to content

Commit

Permalink
Changed setup.cfg path to metricq-python git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
devmaxde committed Oct 15, 2024
1 parent df242d5 commit 38fc4e7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
35 changes: 17 additions & 18 deletions metricq_sink_nsca/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import click
import click_log
from metricq.cli import metricq_command

from .logging import get_logger
from .reporter import ReporterSink
Expand Down Expand Up @@ -48,23 +49,21 @@ def _set_log_levels(_ctx, _param, value: str):
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])


@click.command(context_settings=CONTEXT_SETTINGS)
@click.option("--metricq-server", "-s", default="amqp://localhost/")
@click.option("--token", "-t", default="sink-nsca")
@metricq_command(default_token="sink-nsca", client_version=None)
@click.option("--dry-run", "-n", is_flag=True)
@verbosity_option(root_logger)
def main(metricq_server, token, dry_run):
try:
import uvloop

uvloop.install()
logging.info("Using uvloop-based event loop")
except ImportError:
logging.debug("Using default event loop")

reporter = ReporterSink(
dry_run=dry_run,
management_url=metricq_server,
token=token,
)
reporter.run(cancel_on_exception=True)
def main(server, token, dry_run):
try:
import uvloop

uvloop.install()
logging.info("Using uvloop-based event loop")
except ImportError:
logging.debug("Using default event loop")

reporter = ReporterSink(
dry_run=dry_run,
management_url=server,
token=token,
)
reporter.run(cancel_on_exception=True)
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ include_package_data = True
setup_requires =
setuptools_scm
install_requires =
metricq ~= 4.0
metricq[cli] @ git+https://github.com/metricq/metricq-python.git@188-standardized-cli#egg=metricq[cli]
click ~= 8.0
click-log ~= 0.3

Expand Down

0 comments on commit 38fc4e7

Please sign in to comment.