michaelcarter / mixpanel-data-export-js

Mixpanel data export js
91 stars 38 forks source link

timeout_after value #18

Closed patbegg closed 8 years ago

patbegg commented 8 years ago

Hi, I've been getting an 'Expired request' error returned from Mixpanel but it appears to be fixed if i change the 'timeout_after' option to 100 instead of 10. Is this a value in seconds?

Thanks, Pat

benoitguigal commented 8 years ago

+1

michaelcarter commented 8 years ago

Hi @patbegg, @benoitguigal. From mixpanel's API documentation:

...is any UTC time in the future that represents how long you wish the request consuming data to last. For example, if you wish the request to only last 1 minute, you would calculate the UTC time as of now and then add 60 representing 1 minute ahead.

So to answer your question, yes, it's in seconds. I'm going to bump the default from 10 seconds to 30 in a new release, as 10 seconds seems a bit too little for some projects and I don't see too much harm in bumping it, but this option is intended to be overridden for queries that take a long time.

Thanks for highlighting this as an issue, I'd never have known if nobody had mentioned it. 👍

patbegg commented 8 years ago

Hi,

I will be away from 15th May to 19th June. I will be collecting my email intermittently but if your request is urgent please call on +61 420 971545 and leave a message.

Thanks,

Pat