Hello. I'm trying to setup huey task queue to use it on pythonanywhere.
Following the guid on huey docs I have one file with a task:
# demo.py
from huey import SqliteHuey
huey = SqliteHuey(filename='/tmp/demo.db')
@huey.task()
def add(a, b):
return a + b
And another file that sends this task to the queue:
from demo import add
r = add(1, 2)
Now, when I run the task queue in the separate console with
huey_consumer.py demo.huey
The first run of the file with task works well, but every time after the second run of the file I get the following error:
2021-05-20 02:48:29,667] ERROR:huey.consumer.Worker:Worker-2:Error reading from queue
Traceback (most recent call last):
File "/home/mkondratyev85/.virtualenvs/my-virtualenv/lib/python3.7/site-packages/huey/consumer.py", line 109, in loop
task = self.huey.dequeue()
File "/home/mkondratyev85/.virtualenvs/my-virtualenv/lib/python3.7/site-packages/huey/api.py", line 306, in dequeue
data = self.storage.dequeue()
File "/home/mkondratyev85/.virtualenvs/my-virtualenv/lib/python3.7/site-packages/huey/storage.py", line 734, in dequeue
'order by priority desc, id limit 1', (self.name,))
sqlite3.DatabaseError: database disk image is malformed
[2021-05-20 02:48:30,329] ERROR:huey.consumer.Worker:Worker-1:Error reading from queue
This example works fine on my local computer, but fails on pythonanywhere.
Is there the way to run huey task queue on pythonanywhere?