This question has been flagged
2351 Views

Hi,

I need to store some values during very short time(in order to sync several clients) and I would like it dosen't appear in the database. I thought osv_memory did that but after testing, instances are recorded in the database.

How can I store some list or dictionary in a memory area shared by all the OpenERP threads ?

Thanks.

Avatar
Discard

osv_memory objects are written into the database but also get pruned regularly. My only guess would be to utilize context for something like that. Hard to say when I don't know why you need it shared between threads though.

Author

Thanks. My purpose is to synchronize several third party clients. So if it's not shared between all the threads, one client may use the thread1 to push and another client would pull from thread2... and it would be unsynchronised...

Would it make more sense for the third party clients to interact with the database? Just a thought, I'm not sure how I'd handle a situation like that.