mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-20 14:22:08 +00:00
Fmt.
This commit is contained in:
parent
7c030f0618
commit
f81b51d7d2
@ -1211,7 +1211,12 @@ fn shard_manager(
|
|||||||
|
|
||||||
// We received a shutdown signal
|
// We received a shutdown signal
|
||||||
if shutdown.load(Ordering::SeqCst) {
|
if shutdown.load(Ordering::SeqCst) {
|
||||||
terminate("shard", p, Duration::from_secs(graceful_termination_timeout)).unwrap();
|
terminate(
|
||||||
|
"shard",
|
||||||
|
p,
|
||||||
|
Duration::from_secs(graceful_termination_timeout),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1550,7 +1555,7 @@ fn spawn_shards(
|
|||||||
status_receiver: &mpsc::Receiver<ShardStatus>,
|
status_receiver: &mpsc::Receiver<ShardStatus>,
|
||||||
status_sender: mpsc::Sender<ShardStatus>,
|
status_sender: mpsc::Sender<ShardStatus>,
|
||||||
running: Arc<AtomicBool>,
|
running: Arc<AtomicBool>,
|
||||||
graceful_termination_timeout: u64
|
graceful_termination_timeout: u64,
|
||||||
) -> Result<(), LauncherError> {
|
) -> Result<(), LauncherError> {
|
||||||
// Start shard processes
|
// Start shard processes
|
||||||
for rank in 0..num_shard {
|
for rank in 0..num_shard {
|
||||||
@ -2317,7 +2322,12 @@ fn main() -> Result<(), LauncherError> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Graceful termination
|
// Graceful termination
|
||||||
terminate("webserver", webserver, Duration::from_secs(graceful_termination_timeout)).unwrap();
|
terminate(
|
||||||
|
"webserver",
|
||||||
|
webserver,
|
||||||
|
Duration::from_secs(graceful_termination_timeout),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
shutdown_shards(shutdown, &shutdown_receiver);
|
shutdown_shards(shutdown, &shutdown_receiver);
|
||||||
|
|
||||||
exit_code
|
exit_code
|
||||||
|
Loading…
Reference in New Issue
Block a user