MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / count_session_rows

Function count_session_rows

app/api/agentops/exporter/processor.py:514–527  ·  view source on GitHub ↗

Count the number of rows in the sessions table

()

Source from the content-addressed store, hash-verified

512
513
514async def count_session_rows() -> int:
515 """Count the number of rows in the sessions table"""
516 query = """
517 SELECT COUNT(*) FROM sessions
518 WHERE id > '{last_session_id}'
519 """
520 query = query.format(
521 last_session_id=LAST_SESSION_ID if LAST_SESSION_ID else '00000000-0000-0000-0000-000000000000'
522 )
523 async with get_supabase_pool().connection() as conn:
524 async with conn.cursor() as cur:
525 await cur.execute(query)
526 rows = await cur.fetchone()
527 return rows[0]
528
529
530def init_files():

Callers 1

mainFunction · 0.85

Calls 3

get_supabase_poolFunction · 0.85
fetchoneMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…