Hi Laurent

If you want to see exceptions, you will have to use *submit* rather than
*run*. Exceptions are only generated when the response is JSON decoded and
*run* does not do this.

I strongly suggest that you upgrade to py2neo 2.0 and, if possible, migrate
to using Cypher transactions instead of batches.

Nigel

On 6 September 2015 at 19:06, <[email protected]> wrote:

> Hi Nigel,
>
> Thanks for the answer. Very much appreciated and always good to get a
> confirmation from the expert :)
> I'm still investigating the case but progress is very slow because I can't
> reproduce the problem with "artificial" simple code.
>
> For now, my intuition is that a cypher query or a write batch is stuck and
> locks the next ones. My main problem is that I can't get any log of an
> exception.
> Currently, I'm checking if enabling execution_guard could help to unlock
> the situation.
>
> Just one more question: In Py2neo 1.6, we have the following code for
> WriteBatch:
>
> def run(self):
>         return self._execute().close()
>
> def submit(self):
>         responses = self._execute()
>         try:
>             return [BatchResponse(rs).hydrated for rs in responses.json]
>         finally:
>             responses.close()
>
> One of my previous test seems to indicate that run() don't forward
> exception but more importantly for me, it seems that it doesn't freeze the
> processes :)
> I guess this behavior is related to the execution of close(). So, I wonder
> if a modification of submit() method may help to solve my problem. Do you
> see a potential problem with this modification ?
>
> def submit(self):
>         try:
>             responses = self._execute()
>            return [BatchResponse(rs).hydrated for rs in responses.json]
>         finally:
>             responses.close()
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to