INNER CODE UNIT · Python
setting
iamlukethedev/Hermes3D · plugins/hermes3d-office-bridge/__init__.py:189
def setting(key: str, fallback: Any) -> Any:
try:
value = ctx.get_config(key, fallback)
except Exception:
return fallback
return fallback if value in (None, "") else value
_publisher = OfficePublisher(
build_publish_url(
host=str(setting("host", DEFAULT_HOST)),
port=int(setting("port", DEFAULT_PORT)),
channel=str(setting("channel", DEFAULT_CHANNEL)),
token=token,
)
)
# A one-shot CLI turn ends its process the moment the hook returns, well
# before a background send completes. Give the queue a bounded chance to
# drain so those turns reach the office too, not just long-lived backends.