mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 00:29:53 -05:00
post-deploy bug fixes
This commit is contained in:
parent
551d1868d1
commit
4a60ff3367
@ -297,7 +297,7 @@ def brozzle_page(argv=None):
|
|||||||
window_height=args.window_height,
|
window_height=args.window_height,
|
||||||
window_width=args.window_width,
|
window_width=args.window_width,
|
||||||
stealth=args.stealth,
|
stealth=args.stealth,
|
||||||
metrics_port=args.metrics_port,
|
metrics_port=int(args.metrics_port),
|
||||||
registry_url=args.registry_url,
|
registry_url=args.registry_url,
|
||||||
env=args.env,
|
env=args.env,
|
||||||
)
|
)
|
||||||
@ -540,7 +540,7 @@ def brozzler_worker(argv=None):
|
|||||||
)
|
)
|
||||||
arg_parser.add_argument(
|
arg_parser.add_argument(
|
||||||
"--metrics_port",
|
"--metrics_port",
|
||||||
dest=metrics_port,
|
dest="metrics_port",
|
||||||
default=8888,
|
default=8888,
|
||||||
help="Prometheus metrics port",
|
help="Prometheus metrics port",
|
||||||
)
|
)
|
||||||
@ -612,7 +612,7 @@ def brozzler_worker(argv=None):
|
|||||||
skip_visit_hashtags=args.skip_visit_hashtags,
|
skip_visit_hashtags=args.skip_visit_hashtags,
|
||||||
skip_youtube_dl=args.skip_youtube_dl,
|
skip_youtube_dl=args.skip_youtube_dl,
|
||||||
stealth=args.stealth,
|
stealth=args.stealth,
|
||||||
metrics_port=args.metrics_port,
|
metrics_port=int(args.metrics_port),
|
||||||
registry_url=args.registry_url,
|
registry_url=args.registry_url,
|
||||||
env=args.env,
|
env=args.env,
|
||||||
)
|
)
|
||||||
|
@ -42,12 +42,18 @@ def register_prom_metrics(
|
|||||||
if registry_url is None:
|
if registry_url is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
env_for_prom = None
|
||||||
|
if env == "qa":
|
||||||
|
env_for_prom = Env.qa
|
||||||
|
elif env == "prod":
|
||||||
|
env_for_prom = Env.prod
|
||||||
|
|
||||||
config = ClientConfig(server_url_base=registry_url)
|
config = ClientConfig(server_url_base=registry_url)
|
||||||
client = Client(config)
|
client = Client(config)
|
||||||
target = format_self_target(scrape_port=metrics_port)
|
target = format_self_target(scrape_port=metrics_port)
|
||||||
registration = Registration(
|
registration = Registration(
|
||||||
target=target,
|
target=target,
|
||||||
env=env,
|
env=env_for_prom,
|
||||||
scheme=Scheme.http,
|
scheme=Scheme.http,
|
||||||
)
|
)
|
||||||
client.keep_registered_threaded(registration)
|
client.keep_registered_threaded(registration)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user