File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use tokio::sync::Mutex;
5
5
use crate :: epsilon:: api:: epsilon_api:: EpsilonApi ;
6
6
use crate :: epsilon:: api:: epsilon_events:: EpsilonEvent :: SendToServer ;
7
7
use crate :: epsilon:: queue:: queue_provider:: QueueProvider ;
8
+ use crate :: epsilon:: server:: instance:: VectorOfInstance ;
8
9
use crate :: epsilon:: server:: instance_type:: InstanceType ;
9
10
use crate :: epsilon:: server:: state:: EpsilonState ;
10
11
use crate :: { EResult , InstanceProvider , Task } ;
@@ -50,7 +51,10 @@ impl Task for QueueTask {
50
51
)
51
52
. await ?;
52
53
53
- if instances_starting. is_empty ( ) && instances_ready. is_empty ( ) {
54
+ if instances_starting. is_empty ( )
55
+ && ( instances_ready. is_empty ( )
56
+ || instances_ready. get_available_slots ( ) . await ? < 3 )
57
+ {
54
58
self . instance_provider . start_instance ( template_name) . await ?;
55
59
}
56
60
You can’t perform that action at this time.
0 commit comments