Merge pull request #3202 from manumonti/fix-prometheus

Fix Prometheus import error when running Porter
pull/3204/head
LunarBytes 2023-08-24 11:45:28 +02:00 committed by GitHub
commit 0c3f406482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -0,0 +1 @@
Fix Prometheus import error when running Porter

View File

@ -4,6 +4,7 @@ import time
from pathlib import Path
from queue import Queue
from typing import (
TYPE_CHECKING,
Any,
Dict,
Iterable,
@ -116,7 +117,9 @@ from nucypher.policy.policies import Policy
from nucypher.utilities.emitters import StdoutEmitter
from nucypher.utilities.logging import Logger
from nucypher.utilities.networking import validate_operator_ip
from nucypher.utilities.prometheus.metrics import PrometheusMetricsConfig
if TYPE_CHECKING:
from nucypher.utilities.prometheus.metrics import PrometheusMetricsConfig
class Alice(Character, actors.PolicyAuthor):
@ -990,13 +993,13 @@ class Ursula(Teacher, Character, actors.Operator, actors.Ritualist):
def run(
self,
emitter: StdoutEmitter = None,
discovery: bool = True, # TODO: see below
discovery: bool = True,
availability: bool = False,
worker: bool = True,
ritualist: bool = True,
hendrix: bool = True,
start_reactor: bool = True,
prometheus_config: PrometheusMetricsConfig = None,
prometheus_config: "PrometheusMetricsConfig" = None,
preflight: bool = True,
block_until_ready: bool = True,
eager: bool = False,