Forums

How can I use redislite with celery here on pythonanywhere?

I've tried using redislite with celery here as redis is not supported . I keep getting the error OSError: Load average are unobtainable.

i used redislite implementation on the doc, as follows:

# settings.py

from redislite import Redis

# Create a Redis instance using redislite
REDIS_DB_PATH = os.path.join('/tmp/my_redis.db')
rdb = Redis(REDIS_DB_PATH)
REDIS_SOCKET_PATH = 'redis+socket://%s' % (rdb.socket_file, )

# Use redislite for the Celery broker
BROKER_URL = REDIS_SOCKET_PATH

# (Optionally) use redislite for the Celery result backend
CELERY_RESULT_BACKEND = REDIS_SOCKET_PATH


# your_celery_app.py

from celery import Celery

# for django projects
from django.conf import settings
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
celery_app = Celery('my_app')
celery_app.config_from_object('django.conf:settings')

Any help will be appreciated

[edited by admin: formatting]

what's the full error traceback?