dresende / node-orm2

Object Relational Mapping
http://github.com/dresende/node-orm2
MIT License
3.07k stars 376 forks source link

afterCreate hooks timeout? #528

Closed jwhitehorn closed 10 years ago

jwhitehorn commented 10 years ago

Just curious, are there any known limitations (intentional or otherwise) that cause hooks (specifically afterCreate hooks) to have a "timeout"?

The situation I'm running into, and trying to debug, is that I have a few afterCreate hooks that attempt to create other models (children of the model that was just created). I have unit tests that assert that these hooks "work". The unit test simply create the parent model, and the pokes into the database and asserts that the children exist.

However... sometimes those hooks don't appear to run to completion. In other words, sometimes the child objects aren't created.

I'm still in the process of debugging on my end, so I apologize if I don't have a lot of specifics to share, but I mainly wanted to reach out to you and see if there was any limitations on how long such a hook could run before? (e.g. if a afterCreate runs for more than 500ms we go ahead and shutdown the "transaction").... again, just guessing.