Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
abook_check
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • abook_android
  • abook_check
  • Merge Requests
  • !312

Merged
Opened Apr 21, 2023 by Kazuyuki Hida@hida-k 
  • Report abuse
Report abuse

API呼び出し失敗時にリトライするようにした。

https://redmine.agentec.jp/issues/53022 の対応

マスターデータの読み込み失敗により、不正な報告ができてしまう不具合があり、その改善のためにAPI読み込み時に失敗してもリトライするようにした。

また、失敗したことがユーザに伝わっていなかったので、エラーメッセージを表示するようにした。

Edited Apr 21, 2023 by Kazuyuki Hida
×

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b contract/sato/1.0.301_53022_group_id origin/contract/sato/1.0.301_53022_group_id

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout contract/sato/1.0.301
git merge --no-ff contract/sato/1.0.301_53022_group_id

Step 4. Push the result of the merge to GitLab

git push origin contract/sato/1.0.301

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 7
  • Commits 3
  • Changes 8
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Apr 21, 2023
    Resolved by Yujin Seo Apr 21, 2023
    ABVJE_BL/build.gradle
    1 1 apply plugin: 'java'
    2 2
    3 sourceCompatibility = 1.6
    4 targetCompatibility = 1.6
    3 sourceCompatibility = 1.8
    4 targetCompatibility = 1.8
    • Kazuyuki Hida @hida-k commented Apr 21, 2023
      Developer

      このモジュールだけ、Java1.6用の設定になっていたので、1.8に上げた(徐さん了解済み)

      Edited Apr 21, 2023
      このモジュールだけ、Java1.6用の設定になっていたので、1.8に上げた(徐さん了解済み)
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Apr 21, 2023
    Resolved by Yujin Seo Apr 21, 2023
    ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
    832 832
    833 833 Logger.d(TAG, "[url : %s], [param : %s]", apiUrl, param==null?"":param.toHttpParameterString());
    834 834
    835 HttpTaskWorker<HttpParameterObject> httpTaskThread = new HttpTaskWorker<HttpParameterObject>(methodName, apiUrl, param);
    835 HttpTaskWorker<HttpParameterObject> httpTaskThread = null;
    836 836
    837 837 try {
    838 httpTaskThread.start();
    839 httpTaskThread.join(HttpRequestSender.DefaultConnectionTimeout);
    838 long t = HttpRequestSender.DefaultConnectionTimeout * 2;
    839 for (int i = 0; i < 3; i++, t *= 2) {
    840 httpTaskThread = new HttpTaskWorker<HttpParameterObject>(methodName, apiUrl, param);
    841 httpTaskThread.start();
    842 httpTaskThread.join(t);
    843 }
    • Kazuyuki Hida @hida-k commented Apr 21, 2023
      Developer

      タイムアウト指定を伸ばしながら、リトライするようにしました

      Edited Apr 21, 2023 by Kazuyuki Hida
      タイムアウト指定を伸ばしながら、リトライするようにしました
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Apr 21, 2023
    Resolved by Yujin Seo Apr 21, 2023
    ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/AcmsClient.java
    880 884 }
    881 885
    882 886 String apiUrl = url;
    883
    884 HttpMultipartTaskWorker<HttpMultipart> httpTaskThread = new HttpMultipartTaskWorker<HttpMultipart>(apiUrl, param);
    885
    887 HttpMultipartTaskWorker<HttpMultipart> httpTaskThread = null;
    886 888 try{
    887 httpTaskThread.start();
    888 httpTaskThread.join(HttpRequestSender.DefaultConnectionTimeout);
    889 long t = HttpRequestSender.DefaultConnectionTimeout * 2;
    890 for (int i = 0; i < 3; i++, t *= 2) {
    891 httpTaskThread = new HttpMultipartTaskWorker<HttpMultipart>(apiUrl, param);
    892 httpTaskThread.start();
    893 httpTaskThread.join(t);
    894 }
    • Kazuyuki Hida @hida-k commented Apr 21, 2023
      Developer

      リトライするようにしました。

      Edited Apr 21, 2023
      リトライするようにしました。
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Apr 21, 2023
    Resolved by Yujin Seo Apr 21, 2023
    ABVJE_BL/src/jp/agentec/abook/abv/bl/download/ContentRefresher.java
    86 86 private ContentRefresher() {
    87 87 }
    88 88
    89 public void setContentDownloadListener(ContentDownloadListener contentDownloadListener) {
    90 this.contentDownloadListener = contentDownloadListener;
    91 }
    92
    • Kazuyuki Hida @hida-k commented Apr 21, 2023
      Developer

      使っていないので削除しました。 refreshContentList()実行時に、ContentDownloadListenerを渡すので、このとき上書きされてしまって意味のない処理になっていました。

      Edited Apr 21, 2023
      使っていないので削除しました。 refreshContentList()実行時に、`ContentDownloadListener`を渡すので、このとき上書きされてしまって意味のない処理になっていました。
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Apr 21, 2023
    Resolved by Yujin Seo Apr 21, 2023
    ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/MasterDataLogic.java
    25 26 * @throws Exception その他、例外です。
    26 27 * @since 1.0.0
    27 28 */
    28 public String initializeMasterData(String lastFetchDate) {
    29 public String initializeMasterData(String lastFetchDate) throws AcmsException, NetworkDisconnectedException, IOException {
    • Kazuyuki Hida @hida-k commented Apr 21, 2023
      Developer

      例外を呼び出し側に投げて、そちらで処理するようにしました。

      Edited Apr 21, 2023
      例外を呼び出し側に投げて、そちらで処理するようにしました。
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Apr 21, 2023
    Resolved by Yujin Seo Apr 21, 2023
    ABVJE_BL/src/jp/agentec/adf/net/http/HttpRequestSender.java
    42 42
    43 43 /**
    44 44 * ホストに接続するまでのタイムアウト時間をミリ秒で設定します。<br>
    45 * デフォルトは20,000ミリ秒(20秒)です。
    45 * デフォルトは5,000ミリ秒(5秒)です。
    46 46 * @since 1.0.0
    47 47 */
    48 public static final int DefaultConnectionTimeout = 20 * 1000;
    48 public static final int DefaultConnectionTimeout = 5 * 1000;
    • Kazuyuki Hida @hida-k commented Apr 21, 2023
      Developer

      基準接続タイムアウトを小さくしました。

      Edited Apr 21, 2023
      基準接続タイムアウトを小さくしました。
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Apr 21, 2023
    Resolved by Yujin Seo Apr 21, 2023
    ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
    427 427 runOnUiThread(new Runnable() {
    428 428 @Override
    429 429 public void run() {
    430 if (ex != null) {
    431 // ヘッダーの新着更新処理を完了にさせる
    432 stopUpdateAnimation();
    433 final ABookAlertDialog messageDialog = AlertDialogUtil.createAlertDialog(OperationListActivity.this, R.string.app_name);
    434 messageDialog.setMessage(getString(R.string.failed_get_master_data));
    435 messageDialog.setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
    436 @Override
    437 public void onClick(DialogInterface dialog, int whichButton) {
    438 messageDialog.dismiss();
    439 }
    440 });
    441 messageDialog.show();
    442 }
    • Kazuyuki Hida @hida-k commented Apr 21, 2023
      Developer

      エラー時にメッセージを表示するようにしました。

      Edited Apr 21, 2023
      エラー時にメッセージを表示するようにしました。
    Please register or sign in to reply
  • Kazuyuki Hida @hida-k

    assigned to @seo

    Apr 21, 2023

    assigned to @seo

    assigned to @seo
    Toggle commit list
  • Kazuyuki Hida @hida-k

    changed the description

    Apr 21, 2023

    changed the description

    changed the description
    Toggle commit list
  • Kazuyuki Hida @hida-k

    unmarked as a Work In Progress

    Apr 21, 2023

    unmarked as a Work In Progress

    unmarked as a **Work In Progress**
    Toggle commit list
  • Yujin Seo @seo

    resolved all discussions

    Apr 21, 2023

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Yujin Seo @seo

    merged

    Apr 21, 2023

    merged

    merged
    Toggle commit list
  • Yujin Seo @seo

    mentioned in commit c7799992

    Apr 21, 2023

    mentioned in commit c7799992

    mentioned in commit c779999216ed814400574106e70bff7cdb38d416
    Toggle commit list
  • Kazuyuki Hida @hida-k

    mentioned in commit 253738c9

    Apr 24, 2023

    mentioned in commit 253738c9

    mentioned in commit 253738c92ce76c2fb223750d733fcd2ec96fef64
    Toggle commit list
  • Kazuyuki Hida @hida-k

    mentioned in merge request !313 (merged)

    Apr 24, 2023

    mentioned in merge request !313 (merged)

    mentioned in merge request !313
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Yujin Seo
Assignee
Yujin Seo @seo
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: abook_android/abook_check!312
×

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.