On Tue, Dec 6, 2011 at 14:17, Roberto De Ioris <[email protected]> wrote:
> > > yes, but it wont works > > i have this loop > > > > users = db(db.auth_user.id > 0).select() > > > > for i in users: > > db(db.auth_user.id == i.id).update(a = 'b') > > > > but nothing is updated > > it also failed for i.update_record(a = 'b') > > are you calling db.commit() ? > nop.. that was the problem.. thanks! > > > > > > > with pickle when I do this: > > > > serialized = pickle.dumps(db) > > > > It gets this error > > > > File "/usr/lib/python2.7/pickle.py", line 1374, in dumps > > > > Pickler(file, protocol).dump(obj) > > > > File "/usr/lib/python2.7/pickle.py", line 224, in dump > > > > self.save(obj) > > File "/usr/lib/python2.7/pickle.py", line 306, in save > > > > rv = reduce(self.proto) > > > > File "/usr/lib/python2.7/copy_reg.py", line 74, in _reduce_ex > > > > getstate = self.__getstate__ > > File "/opt/web2py/gluon/dal.py", line 4511, in __getattr__ > > > > return self[key] > > File "/opt/web2py/gluon/dal.py", line 4505, in __getitem__ > > > > return dict.__getitem__(self, str(key)) > > KeyError: '__getstate__' > > > > > > > > You cannot serialize a connection > If I can't serialize db, is there any other way you know how to pass db to the spooler module, instead of creating a new db object? > -- > Roberto De Ioris > http://unbit.it > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
