daemon.clients.workspaces module

class daemon.clients.workspaces.AsyncWorkspaceClient(uri, logger, timeout=None)[source]

Bases: daemon.clients.base.AsyncBaseClient

Async Client to create/update/delete Workspaces on remote JinaD

async create(*args, **kwargs)

Create a Workspace/Flow/Pea/Pod on remote. Must be implemented by the inherited class.

# noqa: DAR101 # noqa: DAR102

async wait(id, status, logs=True, sleep=2)[source]

Wait until workspace creation completes

Parameters
  • id (DaemonID) – workspace id

  • status (Status) – rich.console.status object to update

  • logs (bool) – True if logs need to be streamed, defaults to True

  • sleep (int) – sleep time between each check, defaults to 2

Return type

bool

Returns

True if workspace creation succeeds

async update(*args, **kwargs)

Update a Workspace/Flow/Pea/Pod on remote. Must be implemented by the inherited class.

# noqa: DAR101 # noqa: DAR102

async delete(*args, **kwargs)

Delete a Workspace/Flow/Pea/Pod on remote. Must be implemented by the inherited class.

# noqa: DAR101 # noqa: DAR102

class daemon.clients.workspaces.WorkspaceClient(uri, logger, timeout=None)[source]

Bases: daemon.clients.mixin.AsyncToSyncMixin, daemon.clients.workspaces.AsyncWorkspaceClient

Client to create/update/delete workspaces on remote JinaD