Skip to main content

almanak_library.profiler.time_block

datetime

timezone

Enum

Path

Optional

retry

JSON

Column

UniqueConstraint

sessionmaker

Field

Session

SQLModel

select

get_metrics_engine

Config

STORAGE_DIR

LOCAL_DB_PATH

IS_AGENT_DEPLOYMENT

TIME_BLOCK_DB_CONNECTION_STRING

ProfileType Objects

class ProfileType(Enum)

BUILD_TRANSACTION

EXECUTE_TRANSACTION

SEND_TRANSACTION

SIGN_TRANSACTION

WAIT_FOR_RECEIPT

PARSE_RECEIPT

STRATEGY

POST_PROCESS

TOTAL

TimeBlockTable Objects

class TimeBlockTable(SQLModel)

__tablename__

id

time

name

profile_type

strategy_id

strategy_state

strategy_substate

action_types

action_id

duration

timing_metadata

__table_args__

TimeBlockHandler Objects

class TimeBlockHandler()

__init__

def __init__(db_connection_string: str = TIME_BLOCK_DB_CONNECTION_STRING)

create_tables

def create_tables()

add

@retry(tries=3, delay=2, backoff=2, jitter=(1, 3), exceptions=(Exception, ))
def add(info: str) -> None

get_time_block

@retry(tries=3, delay=2, backoff=2, jitter=(1, 3), exceptions=(Exception, ))
def get_time_block(strategy_id: Optional[str] = None,
profile_type: Optional[ProfileType] = None,
name_substr: Optional[str] = None)

IS_SQL_PROXY

SQL_PROXY_ADDRESS

USE_SQL_PROXY