mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
address greptile review feedback (greploop iteration 7)
- Reject zero-interval schedule_spec to prevent unbounded firing loop - Use normalized (tz-aware) expires_at when persisting in CREATE path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ca0eae194c
commit
676ed15e28
2 changed files with 2 additions and 2 deletions
|
|
@ -166,7 +166,7 @@ async def create_scheduled_task(
|
|||
schedule_spec=data.schedule_spec,
|
||||
schedule_tz=data.schedule_tz,
|
||||
next_run_at=next_run_at,
|
||||
expires_at=data.expires_at,
|
||||
expires_at=expires_at,
|
||||
fire_once=fire_once,
|
||||
)
|
||||
return _row_to_response(row)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ from apscheduler.triggers.cron import ( # type: ignore[import-not-found, import
|
|||
)
|
||||
|
||||
|
||||
_INTERVAL_RE = re.compile(r"^\s*(\d+)\s*([smhd])\s*$", re.IGNORECASE)
|
||||
_INTERVAL_RE = re.compile(r"^\s*([1-9]\d*)\s*([smhd])\s*$", re.IGNORECASE)
|
||||
_INTERVAL_UNITS = {
|
||||
"s": "seconds",
|
||||
"m": "minutes",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue