Start 2FA bot after gateway recovery restarts#45
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c33226b8b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| echo "Ensuring ${container_name} is running before readiness check." | ||
| docker compose up -d --no-build | ||
| ensure_2fa_bot_running |
There was a problem hiding this comment.
Do not abort readiness recovery on 2FA bot startup errors
Because this script runs with set -e, calling ensure_2fa_bot_running as a required step makes the whole recovery fail whenever ensure_2fa_bot_running.sh returns non-zero (for example, if 2fa_bot.py exits immediately due to invalid/missing TOTP_SECRET while IBKR_2FA_AUTOFILL is enabled). In that case the script exits before wait_for_ready, so the health check can report failure even when the gateway API is already healthy or would recover without the bot (e.g., existing authenticated session / non-2FA path).
Useful? React with 👍 / 👎.
Summary
Verification