Skip to content

Commit

Permalink
Revert requirement for TraderId
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Jan 24, 2024
1 parent f0b8ad9 commit 990a3f8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nautilus_trader/system/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,12 @@ def __init__( # noqa (too complex)
self._save_state: bool = config.save_state

# Identifiers
trader_id = config.trader_id
if isinstance(trader_id, str):
trader_id = TraderId(trader_id)

self._name: str = name
self._trader_id: TraderId = config.trader_id
self._trader_id: TraderId = trader_id
self._machine_id: str = socket.gethostname()
self._instance_id: UUID4 = config.instance_id or UUID4()
self._ts_created: int = time.time_ns()
Expand All @@ -150,7 +154,7 @@ def __init__( # noqa (too complex)
logging: LoggingConfig = config.logging or LoggingConfig()

bypass = logging.bypass_logging
if bypass and self._environment == Environment.LIVE:
if self._environment == Environment.LIVE:
# It shouldn't be possible to bypass logging in a `LIVE` context (this is unsafe),
# resetting bypass and will log a warning after logger is initialized.
bypass = False
Expand Down

0 comments on commit 990a3f8

Please sign in to comment.