Skip to content

Commit

Permalink
fix: set timeout of service to 190 sec (autowarefoundation#32)
Browse files Browse the repository at this point in the history
* fix: set timeout of service to 190 sec

* follow pre-commit

* remove unnecessary brackets

* follow pre-commit

* set timeout to 190sec considering systemd default timeout(start/stop) plus extra

* set timeout to 190sec considering systemd default timeout(start/stop) plus extra

* add description for timeout

* add web site
  • Loading branch information
kk-inoue-esol authored Mar 17, 2022
1 parent 3d81198 commit d622332
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion autoware_iv_external_api_adaptor/src/rosbag_logging_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ void RosbagLoggingMode::setRosbagLoggingMode(
const tier4_external_api_msgs::srv::SetRosbagLoggingMode::Request::SharedPtr request,
const tier4_external_api_msgs::srv::SetRosbagLoggingMode::Response::SharedPtr response)
{
const auto [status, resp] = cli_set_rosbag_logging_mode_->call(request);
// systemd's default timeouts for starting and stopping are both 90 seconds.
// See below for more details.
// https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html
// So timeout for restarting is 180 seconds by default.
// The value of timeout below is 10 seconds added with a margin.
const auto [status, resp] =
cli_set_rosbag_logging_mode_->call(request, std::chrono::seconds(190));
if (!tier4_api_utils::is_success(status)) {
response->status = status;
return;
Expand Down

0 comments on commit d622332

Please sign in to comment.