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(gatsby-source-drupal): Add timeout in case of stalled API requests #33668

Merged
merged 3 commits into from
Oct 26, 2021

Conversation

KyleAMathews
Copy link
Contributor

@KyleAMathews KyleAMathews commented Oct 25, 2021

We observe stalled API requests sometimes on customer sites. Adding a timeout ensures these don't block sourcing.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 25, 2021
@KyleAMathews KyleAMathews added topic: source-drupal Related to Gatsby's integration with Drupal type: bug An issue or pull request relating to a bug in Gatsby and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Oct 25, 2021
@@ -253,7 +257,7 @@ ${JSON.stringify(webhookBody, null, 4)}`

// lastFetched isn't set so do a full rebuild.
if (!lastFetched) {
setPluginStatus({ lastFetched: new Date().getTime() })
setPluginStatus({ lastFetched: Math.floor(new Date().getTime() / 1000) })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also fix the timestamp creation as JS uses milliseconds and PHP uses seconds.

Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

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

👍

@vladar vladar merged commit 113ae43 into master Oct 26, 2021
@vladar vladar deleted the drupal-updates branch October 26, 2021 08:35
vladar pushed a commit that referenced this pull request Oct 27, 2021
#33668)

* feat(gatsby-source-drupal): More ports from customer fixes

* cleanups

(cherry picked from commit 113ae43)
vladar pushed a commit that referenced this pull request Oct 28, 2021
#33668) (#33705)

* feat(gatsby-source-drupal): More ports from customer fixes

* cleanups

(cherry picked from commit 113ae43)

Co-authored-by: Kyle Mathews <mathews.kyle@gmail.com>
wardpeet pushed a commit to herecydev/gatsby that referenced this pull request Oct 29, 2021
gatsbyjs#33668)

* feat(gatsby-source-drupal): More ports from customer fixes

* cleanups
axe312ger pushed a commit that referenced this pull request Nov 9, 2021
#33668)

* feat(gatsby-source-drupal): More ports from customer fixes

* cleanups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-drupal Related to Gatsby's integration with Drupal type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants