Skip to content

fix: re-implement lock for DBMixin #9

Description

@ClemDoum

Bug description

On some OS, there seem to be race conditions in the JSON DB serialized on the filesystem leading to failures such as this one.

To avoid read/writing to the DB at the same time, the DBMixin should read/write with lock.
This behavior was implemented earlier with a thread.Lock but has been remove has the lock is not serializable accross processes and hence don't worker properly with multiprocessing workers.

Leveraing filelock could be a potential fix for this issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions