Skip to content

Commit bf8781a

Browse files
committed
what 2
Signed-off-by: Asriel Camora <asriel@camora.dev>
1 parent 861ee10 commit bf8781a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

web/src/crons/refresh_travel_states.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,20 @@ impl CronJob for RefreshTravelStates {
7272
"--dc-token-ttl",
7373
&self.config.dc_token_cache.ttl.to_string(),
7474
])
75-
.stdout(Stdio::inherit())
76-
.stderr(Stdio::inherit());
75+
.stdout(Stdio::piped())
76+
.stderr(Stdio::piped());
7777

7878
log::info!(
7979
"Running: {}",
8080
format!("{:?}", cmd.as_std()).replace(self.config.password.as_str(), "***")
8181
);
8282

83+
log::info!("Spawning");
8384
let mut cmd = cmd.spawn()?;
84-
log::info!("waiting");
85-
cmd.wait().await?;
86-
log::info!("waited");
87-
return Ok(());
85+
log::info!("Spawned");
8886
let mut stdout = cmd.stdout.take().unwrap();
8987
let mut stderr = cmd.stderr.take().unwrap();
88+
log::info!("Waiting");
9089
let status = await_cancellable!(cmd.wait(), stop_signal, {
9190
log::error!("Killing connector process...");
9291
let kill_err = cmd.kill().await;
@@ -106,6 +105,7 @@ impl CronJob for RefreshTravelStates {
106105
}
107106
kill_err?;
108107
});
108+
log::info!("Waited");
109109
log::info!("Connector process exited with: {}", status);
110110
drop(cmd);
111111

0 commit comments

Comments
 (0)