Skip to content

Commit

Permalink
update default value of look_back
Browse files Browse the repository at this point in the history
  • Loading branch information
cl0ete committed Oct 25, 2024
1 parent befd268 commit def6f6a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/routes/sse.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def get_sse_subscribe_event_with_field_and_state(
desired_state: str,
group_id: Optional[str] = group_id_query,
look_back: Optional[int] = Query(
default=None, description="Number of seconds to look back for events"
default=300, description="Number of seconds to look back for events"
),
auth: AcaPyAuthVerified = Depends(acapy_auth_verified),
) -> StreamingResponse:
Expand Down
2 changes: 1 addition & 1 deletion app/services/event_handling/sse.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def sse_subscribe_event_with_field_and_state(
field: str,
field_id: str,
desired_state: str,
look_back: Optional[int],
look_back: int = 300,
) -> AsyncGenerator[str, None]:
"""
Subscribe to server-side events for a specific wallet ID and topic.
Expand Down
2 changes: 1 addition & 1 deletion waypoint/routers/sse.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def sse_wait_for_event_with_field_and_state(
default=None, description="Group ID to which the wallet belongs"
),
look_back: Optional[int] = Query(
default=None,
default=300,
description="Number of seconds to look back for events before subscribing",
),
nats_processor: NatsEventsProcessor = Depends(
Expand Down
2 changes: 1 addition & 1 deletion waypoint/services/nats_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def process_events(
topic: str,
stop_event: asyncio.Event,
duration: int = 10,
look_back: int = 0,
look_back: int = 300,
):
logger.debug(
"Processing events for group {} and wallet {} on topic {}",
Expand Down

0 comments on commit def6f6a

Please sign in to comment.