Skip to content

Commit

Permalink
Fixup for handling the sse-keepalive option in the CLI (from #9722)
Browse files Browse the repository at this point in the history
  • Loading branch information
vxgmichel committed Feb 17, 2025
1 parent 6df137a commit ac76118
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/parsec/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from __future__ import annotations

import asyncio
import math
import tempfile
from pathlib import Path
from typing import Any
Expand Down Expand Up @@ -323,8 +322,8 @@ def handle_parse_result(
"--sse-keepalive",
default=30,
show_default=True,
type=float,
callback=lambda ctx, param, value: math.inf if value is None or value <= 0 else value,
type=int,
callback=lambda ctx, param, value: None if value is None or value <= 0 else value,
envvar="PARSEC_SSE_KEEPALIVE",
show_envvar=True,
help="Keep SSE connection open by sending keepalive messages to client, in seconds (pass <= 0 to disable)",
Expand Down

0 comments on commit ac76118

Please sign in to comment.