SQLite Storage¶
The SqliteHuey and the associated SqliteStorage can be
used instead of the default RedisHuey. SqliteHuey is
implemented in such a way that it can safely be used with a multi-process,
multi-thread, or multi-greenlet consumer.
Using SqliteHuey is almost exactly the same as using RedisHuey.
Begin by instantiating the Huey object, passing in the name of the queue
and the filename of the SQLite database:
from huey.contrib.sqlitedb import SqliteHuey
huey = SqliteHuey('my_app', filename='/var/www/my_app/huey.db')
Note
The SQLite storage engine depends on peewee.
For information on installing peewee, see the
peewee installation documentation,
or simply run: pip install peewee.