Allocate space for 2d worth of 5s bars

tina_free_vwap
Tyler Goodlet 2020-11-13 12:31:45 -05:00
parent 1536b97b3c
commit 11a280dc10
1 changed files with 4 additions and 2 deletions

View File

@ -214,10 +214,12 @@ class ShmArray:
... ...
_lotsa_5s = int(5*60*60*10/5)
def open_shm_array( def open_shm_array(
key: Optional[str] = None, key: Optional[str] = None,
# approx number of 5s bars in a "day" x2 # approx number of 5s bars in a "day" x2
size: int = int(2*60*60*10/5), size: int = _lotsa_5s,
dtype: Optional[np.dtype] = None, dtype: Optional[np.dtype] = None,
readonly: bool = False, readonly: bool = False,
) -> ShmArray: ) -> ShmArray:
@ -269,7 +271,7 @@ def open_shm_array(
def attach_shm_array( def attach_shm_array(
token: Tuple[str, str, Tuple[str, str]], token: Tuple[str, str, Tuple[str, str]],
size: int = int(60*60*10/5), size: int = _lotsa_5s,
readonly: bool = True, readonly: bool = True,
) -> ShmArray: ) -> ShmArray:
"""Load and attach to an existing shared memory array previously """Load and attach to an existing shared memory array previously