Hi

I'm not really that knowledgeable about thread-safe vs non-thread-safe
operations but am wondering if a problem I'm seeing might be because of
that.

In my modules directory I've created a module that has a class defined.

Then in db.py I have an _after_insert trigger like so:

db.workorder._after_insert.append(lambda s,f: workorderAfterInsert(s,f))


In my _after_insert trigger I'm instantiating the class from my module like
this:

import workorder.sequencer as sequencer

workorderId = id
wo = db.workorder(workorderId)

sequencer = sequencer.Sequencer(workorder_id=workorderId, db=db)
sequencer.build_bom()
sequencer.sequence()
sequencer.save_sequenced_workorder()

db.commit()


I'm not sure how to describe it, but I'm seeing random errors popping up in
the execution of sequencer.sequence().  My only thought at this point is
that there are thread-safe or concurrency issues going on.

I'd really appreciate it if someone could tell me whether or not this is
safe (or wise).  Any input would be appreciated.

-Jim

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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