Hi Claudius,
Den 16-10-2016 kl. 17:27 skrev Claudius Weinberger:
Can you send us a skeleton of your use-case, so that we better
understand your workflow and how to solve the problem you have encountered?
Why would you ask this? As Florian points out, there is a discrepancy
between the documentation and the actual implementation.
https://github.com/arangodb/arangodb/issues/2042
The documentation describes a very useful feature in Foxx ;-)
kind regards
Thilo
Am 06.10.2016 um 11:53 schrieb Florian <florian.bo...@gmail.com
<mailto:florian.bo...@gmail.com>>:
Sorry for my late answer ;)
Yes, I already use Foxx queues for some work, but I'm a bit confused
about error handling
In the documentation, it says :
Any errors raised by the script will be handled depending on how the
script was invoked:
* if the script was invoked from the HTTP API (e.g. using the web
interface), it will return an error response using the
exception's |statusCode| property if specified or 500.
* if the script was invoked from a Foxx job queue, the job's failure
counter will be incremented and the job will be rescheduled or
marked as failed if no attempts remain.
Since I use it from a Foxx Service, when I throw errors, the job
remains in progress status and blocks every next jobs. How can I
handle this problem ?
My code is :
if(response.statusCode >= 200 && response.statusCode < 300) {
module.exports = true;
} else {
throw new errors.EventFailedError("event_failed", eventData);
}
Thanks in advance !
Florian
Le mardi 13 septembre 2016 12:06:25 UTC+2, Claudius Weinberger a écrit :
Am 13. September 2016 um 11:07:41, Florian (floria...@gmail.com
<javascript:>) schrieb:
I have another question about HTTP request in ArangoDB :
ArangoDB uses synchronous connections so when we send an HTTP
request in a Foxx route, is ArangoDB waiting for the HTTP
response before sending its own response ?
Yes, it is. That's why we introduce Foxx Queue. Did you have a
look at the Foxx Queues already?
_*An example :*_
I have a route in a Foxx service (/createEntity) which :
* save user data into ArangoDB
* send an HTTP request to the SQS (the queue service).
Is the Foxx route waiting for the HTTP request to be sent or
return the response immediately after calling request() function ?
If it is, is it interesting to create a Foxx queue which handles
these HTTP requests ? Is there another way to not wait ?
Thanks in advance !
Florian
--
You received this message because you are subscribed to the
Google Groups "ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to arangodb+u...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to arangodb+unsubscr...@googlegroups.com
<mailto:arangodb+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to arangodb+unsubscr...@googlegroups.com
<mailto:arangodb+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to arangodb+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.