Email sending doesn't work without celery

Issue #80 resolved
MattT created an issue

It seems that the "config" object isn't correctly obtained inside rhodecode/lib/celerylib/tasks.py unless celery is on. config.items() doesn't behave if it's just the pylons config, but this can be fixed by replacing some of the import code with that from the example celeryconfig.py, specifically the production.ini parsing by a ConfigParser.

Comments (4)

  1. Marcin Kuzminski repo owner

    Hi, AFAIR my tests scripts were sending mails without celery,

    Are You sure that celeryconfig.py point to proper ini file that has filled in email configuration ? maybe that's the issue ?

    I'll check that issue later to confirm if this is a bug.

    Also I'm in the middle of full rewrite of celery implementation based on celery-pylons, so i'll throw out celeryconfig.py and put those options in the .ini files this way it's just one point of configuration, and celery will be started using paster. This approach will fix some other issues with celery, like session management,caches.

  2. MattT reporter

    The issue I was seeing was actually a traceback -- without a celeryconfig.py, celery_on was set to False, but the variable config was from pylons. This variable config, unlike the variable config that was set if celery_on ended up True, had a different items() method that did not accept section titles. So every time config.items("DEFAULT") was called, it threw a traceback. This, I believe, was because PYLONS_CONFIG in celeryconfig.py was initialized through ConfigParser while pylons's native config object was just a list of dicts.

  3. Marcin Kuzminski repo owner

    Ok, so i think this is solved in the latest tip, all configuration was moved to ini files so setting use_celery=false in ini, and filling up email settings should work just fine

  4. Log in to comment