表示サービスの自動更新とレシート印刷の非同期化 - #52
Merged
Merged
Conversation
- 時刻同期後に fake-hwclock へ保存し、RTC のない Raspberry Pi で 再起動時に時刻が巻き戻るのを防ぐ - 選択商品のバーコード PDF もキャッシュ対象にし、枠線あり版も 起動時にウォームアップ。商品の追加・更新・削除をイベントで受けて キャッシュを作り直す - Danger Zone のパスワード照合に接続元ごとのレート制限を追加。 連続失敗が上限に達している間は照合せず 429 と Retry-After を返す
update-app.sh の最後で upload-apk.sh を呼び、jar が同一バージョンで 早期終了する場合も APK の確認だけは行う。 APK の登録に失敗してもサーバーの更新は成功扱いにし、警告のみ出す。 オフライン更新(jar のパス指定)と --skip-apk 指定時は確認しない。
- main への push で app.jar と kidspos-scripts.tar.gz を添付した server-v* リリースを自動作成する Release Server ワークフローを追加 - app.jar の配布元を一本化するため generate-sdk.yml からは app.jar を外す - update-app.sh がリリース同梱のスクリプトで自身と doctor.sh、upload-apk.sh を差し替えるようにする(--skip-self-update で無効化可能) - 自己更新のテスト 11 件を追加(計 104 assertions) - releases/latest/download/app.jar が使えなくなるためオフライン手順を releases API 経由に変更
- update-app.sh が /opt/kidspos-display のモジュールを配布物で差し替え、稼働中なら kidspos-display を再起動する - 表示サービス未導入の Pi では何もしない。差し替え不要なら --skip-display - 差し替えや再起動に失敗した場合はスクリプトのバージョンを記録せず次回に再試行する - 上記の経路を test-update-app.sh に追加(141 assertions green)
プリンターに到達できないとき、接続が OS 既定のタイムアウトまで ブロックして会計 API がタイムアウトしていた。 - ReceiptPrinter.print に接続タイムアウトと読み書きタイムアウトを追加 - ReceiptService.printReceiptAsync を新設し、送信のみ専用スレッドへ委譲 - プリンター未設定・店舗なしの場合は送信を依頼せず即座に返す - 接続タイムアウトを app.receipt.printer.connect-timeout-millis で設定可能に
Contributor
🎨 Visual Regression Test Results✅ All visual regression tests passed! All page screenshots match the expected baselines. 📊 Test Coverage
|
最新バージョンはバージョンコードの降順で決まるため、手入力ミスで 実際より大きいコードが登録されると古いAPKが配信され続ける。 バージョン名の新しさとコードの大小が食い違う組み合わせを検出し、 APK管理画面に警告として表示する。
Contributor
🎨 Visual Regression Test Results✅ All visual regression tests passed! All page screenshots match the expected baselines. 📊 Test Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
サーバー更新時に e-Paper 表示サービスも一緒に更新できるようにし、あわせて会計 API がレシート印刷を待ってタイムアウトする問題を修正します。
レシート印刷の非同期化
表示サービスの自動更新
テスト
Generated by Claude Code