Skip to content

Commit d56d56b

Browse files
authored
[Fix] Minor fix for support distribute mode (#1589)
1 parent 1d9472b commit d56d56b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

slime/utils/http_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ def __init__(self, concurrency: int):
245245
timeout=httpx.Timeout(None),
246246
)
247247

248-
async def do_post(self, url, payload, max_retries=60):
249-
return await _post(self._client, url, payload, max_retries)
248+
async def do_post(self, url, payload, max_retries=60, headers=None):
249+
return await _post(self._client, url, payload, max_retries, headers=headers)
250250

251251
# Create actors per node
252252
created = []
@@ -279,7 +279,7 @@ async def post(url, payload, max_retries=60, headers=None):
279279
actor = _next_actor()
280280
if actor is not None:
281281
# Use a thread to avoid blocking the event loop on ray.get
282-
obj_ref = actor.do_post.remote(url, payload, max_retries)
282+
obj_ref = actor.do_post.remote(url, payload, max_retries, headers=headers)
283283
return await asyncio.to_thread(ray.get, obj_ref)
284284
except Exception as e:
285285
logger.info(f"[http_utils] Distributed POST failed, falling back to local: {e} (url={url})")

0 commit comments

Comments
 (0)