Skip to content

Commit

Permalink
Add enable-webrtc-task-check
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Nov 30, 2023
1 parent 3fafbba commit a0b25c0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/cli/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ pub fn enable_thread_counter() -> bool {
.is_present("enable-thread-counter");
}

pub fn enable_webrtc_task_test() -> bool {
return MANAGER
.as_ref()
.clap_matches
.is_present("enable-webrtc-task-test");
}

// Return the command line used to start this application
pub fn command_line_string() -> String {
std::env::args().collect::<Vec<String>>().join(" ")
Expand Down Expand Up @@ -230,6 +237,12 @@ fn get_clap_matches<'a>() -> clap::ArgMatches<'a> {
.long("enable-thread-counter")
.help("Enable a thread that prints the number of children processes.")
.takes_value(false),
)
.arg(
clap::Arg::with_name("enable-webrtc-task-test")
.long("enable-webrtc-task-test")
.help("Enable webrtc thread test with limit of child tasks.")
.takes_value(false),
);

matches.get_matches()
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ async fn main() -> Result<(), std::io::Error> {
helper::threads::start_thread_counter_thread();
}

if cli::manager::enable_webrtc_task_test() {
helper::develop::start_check_tasks_on_webrtc_reconnects();
}

stream::webrtc::signalling_server::SignallingServer::default();

if let Err(error) = stream::manager::start_default() {
Expand Down

0 comments on commit a0b25c0

Please sign in to comment.