Skip to content

Modify wrap_as-... functions in external.py #81

@kjstanding

Description

@kjstanding
def wrap_as_queue(name: str, identity: str | None, historian: Historian) -> Queue:
    return _ResourceWrapper(name, identity, historian, Queue)

def wrap_as_event(name: str, identity: str | None, historian: Historian) -> Event:
    return _ResourceWrapper(name, identity, historian, Event)

def wrap_as_state(name: str, identity: str | None, historian: Historian) -> State:
    return _ResourceWrapper(name, identity, historian, State)

def wrap_as_identity_queue(name: str, identity: str | None, historian: Historian) -> IdentityQueue:
    return _ResourceWrapper(name, identity, historian, IdentityQueue)

[byubean]: ideally these would use find_historian and take the resource dict from stream_resources.

Or we would name these get_state, get_queue, etc.

Let's discuss design in class. Separate PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions