Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LT-21713: Clear the error status during cold start retry #33

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Src/xWorks/UploadToWebonaryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ private bool RecursivelyPutFilesToWebonary(UploadToWebonaryModel model, string d
var signedUrl = PostContentToWebonary(model, webonaryView, "post/file", fileToSign);
if (string.IsNullOrEmpty(signedUrl))
{
webonaryView.SetStatusCondition(WebonaryStatusCondition.None);
webonaryView.UpdateStatus(xWorksStrings.UploadToWebonaryController_RetryAfterFailedConnection);
// Sleep briefly and try one more time (To compensate for a potential lambda cold start)
Thread.Sleep(500);
signedUrl = PostContentToWebonary(model, webonaryView, "post/file", fileToSign);
Expand Down
11 changes: 10 additions & 1 deletion Src/xWorks/xWorksStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Src/xWorks/xWorksStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1259,4 +1259,7 @@ See USFM documentation for help.</value>
<data name="Webonary_UnexpectedUploadError" xml:space="preserve">
<value>Unexpected error encountered while uploading to webonary.</value>
</data>
<data name="UploadToWebonaryController_RetryAfterFailedConnection" xml:space="preserve">
<value>Initial connection failed retrying...</value>
</data>
</root>
Loading