Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle multiple threads writing to the db at the same time #129

Open
benoitguigal opened this issue Aug 30, 2016 · 1 comment
Open

Handle multiple threads writing to the db at the same time #129

benoitguigal opened this issue Aug 30, 2016 · 1 comment
Labels

Comments

@benoitguigal
Copy link
Contributor

30.08.16 19:19:10 [+0200] File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
30.08.16 19:19:10 [+0200] self.run()
30.08.16 19:19:10 [+0200] File "/usr/lib/python2.7/threading.py", line 763, in run
30.08.16 19:19:10 [+0200] self.__target(*self.__args, **self.__kwargs)
30.08.16 19:19:10 [+0200] File "figureraspbian/photobooth.py", line 375, in update_paper_level
30.08.16 19:19:10 [+0200] paper_level = db.update_paper_level(pixels)
30.08.16 19:19:10 [+0200] File "figureraspbian/db.py", line 354, in update_paper_level
30.08.16 19:19:10 [+0200] photobooth.save()
30.08.16 19:19:10 [+0200] File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 4742, in save
30.08.16 19:19:10 [+0200] rows = self.update(**field_dict).where(self._pk_expr()).execute()
30.08.16 19:19:10 [+0200] File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3117, in execute
30.08.16 19:19:10 [+0200] return self.database.rows_affected(self._execute())
30.08.16 19:19:10 [+0200] File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2656, in _execute
30.08.16 19:19:10 [+0200] return self.database.execute_sql(sql, params, self.require_commit)
30.08.16 19:19:10 [+0200] File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3492, in execute_sql
30.08.16 19:19:10 [+0200] self.commit()
30.08.16 19:19:10 [+0200] File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3316, in __exit__
30.08.16 19:19:10 [+0200] reraise(new_type, new_type(*exc_args), traceback)
30.08.16 19:19:10 [+0200] File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3485, in execute_sql
30.08.16 19:19:10 [+0200] cursor.execute(sql, params or ())
30.08.16 19:19:10 [+0200] OperationalError: database is locked
@benoitguigal
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant