[storm] Threading question

Gerdus van Zyl gerdusvanzyl at gmail.com
Fri Jan 11 15:27:24 GMT 2008


How can I move an object between stores?
I am getting:
WrongStoreError: [<class 'model.Entry'> : 22 - Stationary - A - 10] is
part of another store

my code looks like this:
        db = getStore() #thread local store

        for b in self.biz:
            oldstore = Store.of(b)
            oldstore.remove(b)
            db.add(b)
        db.flush()
        db.commit()

In my GUI application it retrieves a list of items on the main thread
and calls the above code in another thread in reaction to a click
event.

Thanks,
Gerdus



More information about the storm mailing list