Code Monkey home page Code Monkey logo

Comments (3)

tomdyson avatar tomdyson commented on July 29, 2024

Assigned to @spapas, discussing today with @spapas and @gasman.

from wagtail.

spapas avatar spapas commented on July 29, 2024

After an inspection of the code of wagtail and wagtail demo, I found out that Redis is used in two places:

a. As a django cache backend, in the wagtaildemo/settings/base.py. To remove the Redis dependency on development the Redis cache backed will be moved to production.py. Since no cache backend would be defined in base.py and dev.py the default django.core.cache.backends.locmem.LocMemCache backend will be used.

b. As a broker for celery, defined in wagtaildemo/settings/base.py. To remove the Redis dependency from here we can follow two paths:

i. Change base.py like this:

import djcelery
djcelery.setup_loader()
CELERY_ALWAYS_EAGER = True 

this way the tasks will be run synchronously so a broker won't be needed

and move the redis broker configuration to production.py

ii. A different path woul be to remove completely celery as a dependency from the development. Celery is only use in the wagtail / wagtail / wagtailadmin / tasks.py, and more specifically to decorate as a task the send_notification function. So, to remove both celery and redis dependencies completely we can conditionally (if DEBUG==False) decorate the send_notification method and also remove djcelery and kombu.transport.django from the base.py INSTALLED_APPS and only inclue them to the production.py.

I prefer method ii which removes both Redis and Celery. Any thoughts ?

from wagtail.

tomdyson avatar tomdyson commented on July 29, 2024

I like a. and b ii.

from wagtail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.