Hi, well, i already pulled off my hairs so i'm late...... here is the situation: i have 3 sched process that can execute the same task function (diffrerent params) in parallel: task function is like that:
def task(params): try: call module.functionA call module.functionB call module.functionC except Exception as e: db.rollback() raise Exception(type(e).__name__) #re-raise last exception db.commit() one module.function call includes a critical section that performs repeated validate_and_insert on a unique key constrained table this brings about IntegrityErrors so it may take several scheduler rounds to complete all tasks (meanwhile site users should wait.....) i tried to remedy this using: (1) portalocker: doesn't seem to work (2) redis_lock: no good either ('scheduler goes crazy') (3) db.executesql("LOCK TABLE utable IN ACCESS EXCLUSIVE;"): gives a ProgrammingError is there a way to synchronize the 'animal' that's not another programming-nightmare ? -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.