Skip to content

Commit

Permalink
[GH-24]Revert auto_commit=True for compatability (#25)
Browse files Browse the repository at this point in the history
In v0.3.0, auto_commit=False is set as default, this is incompatible
with previous behavior, this change revert to auto_commit=True to
avoid any confusion.

fixes #24
  • Loading branch information
peter-wangxu authored Oct 10, 2017
1 parent df512ee commit 8cd9007
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions persistqueue/sqlbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SQLiteBase(object):
_MEMORY = ':memory:' # flag indicating store DB in memory

def __init__(self, path, name='default', multithreading=False,
timeout=10.0, auto_commit=False):
timeout=10.0, auto_commit=True):
"""Initiate a queue in sqlite3 or memory.
:param path: path for storing DB file.
Expand All @@ -62,7 +62,10 @@ def __init__(self, path, name='default', multithreading=False,
one for **put** and one for **get**.
:param timeout: timeout in second waiting for the database lock.
:param auto_commit: Set to True, if commit is required on every
INSERT/UPDATE action.
INSERT/UPDATE action, otherwise False, whereas
a **task_done** is required to persist changes
after **put**.
"""
self.memory_sql = False
Expand Down

0 comments on commit 8cd9007

Please sign in to comment.