File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,11 @@ impl Task for QueueTask {
36
36
37
37
let instances_starting = self
38
38
. instance_provider
39
- . get_instances ( & InstanceType :: Server , Some ( template_name) , None )
39
+ . get_instances (
40
+ & InstanceType :: Server ,
41
+ Some ( template_name) ,
42
+ Some ( & EpsilonState :: Starting ) ,
43
+ )
40
44
. await ?;
41
45
42
46
let instances_ready = self
@@ -59,6 +63,12 @@ impl Task for QueueTask {
59
63
if let Ok ( info) = info_result {
60
64
let mut available_slots = template. slots as u32 - info. players . online ;
61
65
66
+ if available_slots == 0 && instances_starting. is_empty ( ) {
67
+ self . instance_provider . start_instance ( template_name) . await ?;
68
+
69
+ return Ok ( ( ) ) ;
70
+ }
71
+
62
72
while !queue. is_empty ( ) && available_slots != 0 {
63
73
if let Some ( group) = queue. pop ( ) {
64
74
let group_size = group. players . len ( ) as u32 ;
You can’t perform that action at this time.
0 commit comments