File tree Expand file tree Collapse file tree 1 file changed +22
-7
lines changed
packages/infra/engine/src/commands Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ const LOGS_RETENTION: Duration = Duration::from_secs(7 * 24 * 60 * 60);
1111pub struct Opts {
1212 #[ arg( long, value_enum) ]
1313 services : Vec < ServiceKind > ,
14+
15+ /// Exclude the specified services instead of including them
16+ #[ arg( long) ]
17+ exclude_services : bool ,
1418}
1519
1620#[ derive( clap:: ValueEnum , Clone , PartialEq ) ]
@@ -50,7 +54,7 @@ impl Opts {
5054 . await ?;
5155 }
5256
53- // Select services t orun
57+ // Select services to run
5458 let services = if self . services . is_empty ( ) {
5559 // Run all services
5660 run_config. services . clone ( )
@@ -62,12 +66,23 @@ impl Opts {
6266 . map ( |x| x. clone ( ) . into ( ) )
6367 . collect :: < Vec < rivet_service_manager:: ServiceKind > > ( ) ;
6468
65- run_config
66- . services
67- . iter ( )
68- . filter ( |x| service_kinds. iter ( ) . any ( |y| y. eq ( & x. kind ) ) )
69- . cloned ( )
70- . collect :: < Vec < _ > > ( )
69+ if self . exclude_services {
70+ // Exclude specified services
71+ run_config
72+ . services
73+ . iter ( )
74+ . filter ( |x| !service_kinds. iter ( ) . any ( |y| y. eq ( & x. kind ) ) )
75+ . cloned ( )
76+ . collect :: < Vec < _ > > ( )
77+ } else {
78+ // Include only specified services
79+ run_config
80+ . services
81+ . iter ( )
82+ . filter ( |x| service_kinds. iter ( ) . any ( |y| y. eq ( & x. kind ) ) )
83+ . cloned ( )
84+ . collect :: < Vec < _ > > ( )
85+ }
7186 } ;
7287
7388 // Start server
You can’t perform that action at this time.
0 commit comments