mirror of https://github.com/nucypher/nucypher.git
Fix Prometheus import error when running Porter
Commitpull/3202/heada4de8a88
introduced amazing changes and solved linting errors like F821. To achive it, this change introduced the import of PrometheusMetricsConfig in lawful.py, which is dependant of prometheus-client package. Ursula imports prometheus-client, so no problem with this. But Porter does not. So a import error is raised when Porter is run. Also, a remaining TODO comment has been cleaned. This TODO is part of a larger comment and was introduced in commit424e373a
and solved afterwards.
parent
aa1dbbade3
commit
545fe3b03f
|
@ -0,0 +1 @@
|
|||
Fix Prometheus import error when running Porter
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue