michaeljmarshall commented on a change in pull request #14825:
URL: https://github.com/apache/pulsar/pull/14825#discussion_r833606603



##########
File path: site2/tools/build-site.sh
##########
@@ -66,13 +66,14 @@ cd ${ROOT_DIR}/site2/website
 yarn
 yarn write-translations
 
-if [ "$CROWDIN_DOCUSAURUS_API_KEY" != "UNSET" ]; then
+# The crowdin upload and download take a long time to run, and have resulted 
in timeouts. In order to ensure that the
+# website is still able to get published, we only run the download and upload 
if current hour is 0-5.
+# This leads to executing crowdin-upload and crowdin-download once per day 
when website build is scheduled
+# to run with cron expression '0 */6 * * *'
+CURRENT_HOUR=$(date +%H)
+if [[ "$CROWDIN_DOCUSAURUS_API_KEY" != "UNSET" || $CURRENT_HOUR -lt 6 ]]; then
   # upload only if environment variable CROWDIN_UPLOAD=1 is set
-  # or current hour is 0-5
-  # this leads to executing crowdin-upload once per day when website build is 
scheduled
-  # to run with cron expression '0 */6 * * *'
-  CURRENT_HOUR=$(date +%H)
-  if [[ "$CROWDIN_UPLOAD" == "1" || $CURRENT_HOUR -lt 6 ]]; then
+  if [[ "$CROWDIN_UPLOAD" == "1" ]]; then
     yarn run crowdin-upload
   fi
   yarn run crowdin-download

Review comment:
       I think the long-term fix is to upgrade the crowdin cli. Their docs 
mention that it is more efficient and has multi-threading for uploads.
   
   I agree that separate jobs would make sense too. It only makes sense to 
upload files when docs have actually changed. I wonder if we can upload _just_ 
the changed files.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to