Skip to content

Conversation

@wangzhao0217
Copy link
Contributor

Sets the maximum time (in seconds) to wait while trying to connect to the server. This only limits the connection phase, not the entire request.

By adding httr::config(connecttimeout = 60 * 60 * 5), allowing the connection phase to take up to 5 hours, matching overall timeout.

@wangzhao0217
Copy link
Contributor Author

@Robinlovelace

@Robinlovelace
Copy link
Collaborator

Let's see if the tests pass, will merge if so!

@Robinlovelace Robinlovelace self-requested a review December 3, 2024 10:30
Copy link
Collaborator

@Robinlovelace Robinlovelace left a comment

Choose a reason for hiding this comment

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

Tests not passing:

 ** using staged installation
** R
Error in parse(...) : 
  /home/runner/work/cyclestreets-r/cyclestreets-r/check/cyclestreets.Rcheck/00_pkg_src/cyclestreets/R/batch.R:310:3: unexpected symbol
309:   res = httr::POST(url = batch_url, body = body, httr::timeout(60*60*5), httr::config(connecttimeout = 60 * 60 * 5) # Connection timeout (5 hours))
310:   res_json
       ^
ERROR: unable to collate and parse R files for package ‘cyclestreets’
* removing ‘/home/runner/work/cyclestreets-r/cyclestreets-r/check/cyclestreets.Rcheck/cyclestreets’

Source: https://github.com/cyclestreets/cyclestreets-r/actions/runs/12128460223/job/33841523400?pr=95#step:6:92

Have you tried devtools::check() @wangzhao0217 ?

@wangzhao0217
Copy link
Contributor Author

close with a new PR

@wangzhao0217 wangzhao0217 deleted the patch-1 branch December 4, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants