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

server: ignore exceptions in the Watcher loop #160

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

praiskup
Copy link
Owner

This is a very poor hack, but we don't face exceptions too frequently here. Let's restart if e.g. this happens:

Traceback (most recent call last):
File "/usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
self.dialect.do_execute(
File "/usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: database is locked

# unexpected failure, so let's try to recover :shrug:. If the
# parent dies, we get killed without any announcement, sounds
# fair.
pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we at least log something (the exception) here?

This is a very poor hack, but we don't face exceptions too frequently
here.  Let's restart if e.g. this happens:

Traceback (most recent call last):
  File "/usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
    self.dialect.do_execute(
  File "/usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: database is locked

While we ignore such exceptions now, we at least log out the exception
traceback for later analysis.
@praiskup praiskup merged commit ffc862e into main Jul 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants