Skip to content

runtime

log_panel.runtime

argv_command_names()

Return executable and argument basenames from the current process argv.

Source code in log_panel/runtime.py
def argv_command_names() -> set[str]:
    """Return executable and argument basenames from the current process argv."""
    return {Path(argument).name for argument in sys.argv}

is_storage_muted_command()

Return whether log-panel database writes should be disabled.

Source code in log_panel/runtime.py
def is_storage_muted_command() -> bool:
    """Return whether log-panel database writes should be disabled."""
    return bool(argv_command_names() & STORAGE_MUTED_COMMANDS)

is_migration_command()

Return whether the current process is running Django migration orchestration.

Source code in log_panel/runtime.py
def is_migration_command() -> bool:
    """Return whether the current process is running Django migration orchestration."""
    return bool(argv_command_names() & MIGRATION_COMMANDS)