| 295 | } |
| 296 | |
| 297 | void BaseRunner::initialize() { |
| 298 | load_config([self_id = actor_id(this)](td::Result<td::Unit> R) { |
| 299 | if (R.is_error()) { |
| 300 | td::actor::send_closure(self_id, &BaseRunner::initialization_failure, |
| 301 | R.move_as_error_prefix("failed to parse runner config: ")); |
| 302 | } else { |
| 303 | td::actor::send_closure(self_id, &BaseRunner::load_config_completed); |
| 304 | } |
| 305 | }); |
| 306 | } |
| 307 | void BaseRunner::load_config(td::Promise<td::Unit> promise) { |
| 308 | promise.set_value(td::Unit()); |
| 309 | } |