`.storage.__init__`: code styling updates
parent
614f1c00c5
commit
44c339779f
|
@ -43,7 +43,6 @@ from typing import (
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
from .. import config
|
from .. import config
|
||||||
from ..service import (
|
from ..service import (
|
||||||
check_for_service,
|
check_for_service,
|
||||||
|
@ -162,7 +161,10 @@ class StorageConnectionError(ConnectionError):
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def get_storagemod(name: str) -> ModuleType:
|
def get_storagemod(
|
||||||
|
name: str,
|
||||||
|
|
||||||
|
) -> ModuleType:
|
||||||
mod: ModuleType = import_module(
|
mod: ModuleType = import_module(
|
||||||
'.' + name,
|
'.' + name,
|
||||||
'piker.storage',
|
'piker.storage',
|
||||||
|
@ -177,7 +179,10 @@ def get_storagemod(name: str) -> ModuleType:
|
||||||
async def open_storage_client(
|
async def open_storage_client(
|
||||||
backend: str|None = None,
|
backend: str|None = None,
|
||||||
|
|
||||||
) -> tuple[ModuleType, StorageClient]:
|
) -> tuple[
|
||||||
|
ModuleType,
|
||||||
|
StorageClient,
|
||||||
|
]:
|
||||||
'''
|
'''
|
||||||
Load the ``StorageClient`` for named backend.
|
Load the ``StorageClient`` for named backend.
|
||||||
|
|
||||||
|
@ -277,7 +282,10 @@ async def open_tsdb_client(
|
||||||
from ..data.feed import maybe_open_feed
|
from ..data.feed import maybe_open_feed
|
||||||
|
|
||||||
async with (
|
async with (
|
||||||
open_storage_client() as (_, storage),
|
open_storage_client() as (
|
||||||
|
_,
|
||||||
|
storage,
|
||||||
|
),
|
||||||
|
|
||||||
maybe_open_feed(
|
maybe_open_feed(
|
||||||
[fqme],
|
[fqme],
|
||||||
|
@ -285,7 +293,7 @@ async def open_tsdb_client(
|
||||||
|
|
||||||
) as feed,
|
) as feed,
|
||||||
):
|
):
|
||||||
profiler(f'opened feed for {fqme}')
|
profiler(f'opened feed for {fqme!r}')
|
||||||
|
|
||||||
# to_append = feed.hist_shm.array
|
# to_append = feed.hist_shm.array
|
||||||
# to_prepend = None
|
# to_prepend = None
|
||||||
|
|
Loading…
Reference in New Issue