[EC Connector] Add has_pending_push_work (#49582)
Signed-off-by: omerpaz95 <omerpaz95@gmail.com>
This commit is contained in:
@@ -275,3 +275,15 @@ class ECConnectorBase(ABC):
|
||||
get_finished().
|
||||
"""
|
||||
return False, None
|
||||
|
||||
def has_pending_push_work(self) -> bool:
|
||||
"""Return True if the connector has push-mode work that requires
|
||||
the engine main loop to keep stepping (e.g. for EPD,
|
||||
Producer has push work when Xfer is in progress - Consumer
|
||||
is reading it).
|
||||
This mirrors exactly the KV Connector's has_pending_push_work().
|
||||
|
||||
Connectors that don't implement push-based EC transfer should
|
||||
leave this as False.
|
||||
"""
|
||||
return False
|
||||
|
||||
@@ -2362,6 +2362,10 @@ class Scheduler(SchedulerInterface):
|
||||
self.has_unfinished_requests()
|
||||
or self.has_finished_requests()
|
||||
or (self.connector is not None and self.connector.has_pending_push_work())
|
||||
or (
|
||||
self.ec_connector is not None
|
||||
and self.ec_connector.has_pending_push_work()
|
||||
)
|
||||
)
|
||||
|
||||
def reset_prefix_cache(
|
||||
|
||||
Reference in New Issue
Block a user