Skip to content

Commit

Permalink
Merge pull request #200 from transifex/TX-14801_pull_requests_loop
Browse files Browse the repository at this point in the history
Poling translations infinite loop fix
  • Loading branch information
foteinigk authored Jul 31, 2023
2 parents 5acb442 + 2e68793 commit ee2462a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/txapi/resource_translations_async_downloads.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ func PollTranslationDownload(download *jsonapi.Resource, filePath string) error
}
if download.Redirect != "" {
break
} else if download.Attributes["status"] == "failed" {
return fmt.Errorf(
"download of translation '%s' failed",
download.Relationships["resource"].DataSingular.Id,
)
}
}
resp, err := http.Get(download.Redirect)
Expand Down

1 comment on commit ee2462a

@cacrowley
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/txapi/resource_translations_async_downloads.go

Please sign in to comment.