Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Unexpected behavior of _setTimeout

#1
I'm encountering an issue where my API call to ProjectPoints times out after 30 seconds (expected -- it's a heavy operation) even though I call RDK._setTimeout(30000) immediately prior to the call to ProjectPoints. (I have also tried a more reasonable value of 300.)

Any intuition as to what may be going on here? Is the ._setTimeout method supposed to do the thing I think it's doing? If not, what solution would you recommend for API calls that are expected to take longer than 30 seconds?

Thanks!
#2
ProjectPoints specifically allows you to pass the timeout as a parameter (timeout). Simply specify a more permissive timeout when calling ProjectPoints.

I assume this related to your other issue related to AddShape and AddGeometry:
https://robodk.com/forum/Thread-Advice-o...try-Method

There are some functionst that extend the default timeout and this timeout is hard coded (we'll improve this so that specifying the timout with setTimeout works for those functions as well).
#3
Hi Albert, thanks for the tip -- I missed that in the documentation. I made the change you suggested and things are now working as-expected.

This is sort of related to the AddShape / AddGeometry issues. This operation is not a workaround for either one, but it's in pursuit of the same end goal. (This operation is generating data that defines the geometry I need to add to the workstation.)
#4
Great, thank you for your feedback.
  




Users browsing this thread:
1 Guest(s)