Bug #4158

[ce, ee] pylons.config is missing settings

Added by Daniel D about 6 years ago. Updated almost 6 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Commit Number:
Affected Version:


Problem seems to be after the settings refactor, some of the settings that load_enviromnent() was adding such as 'vcs.hooks.direct_calls' are now not getting added to the pylons.config (from pylons import config) - which is breaking code that depends on this - it is hard to say which parts of code are affected, the @vcsconnection celery decorator for example showed this problem - there may be other places.

Celery Traceback:

[2016-08-09 21:19:55,904: ERROR/MainProcess] Task rhodecode.lib.celerylib.tasks.create_repo_fork[7d3a210e-d20f-4216-bc8d-99fcdf69947d] raised exception: KeyError('vcs.hooks.direct_calls',)
Traceback (most recent call last):
  File "/nix/store/gjgiaqj5n9kvvmabxk79i3yf9m9172yf-python2.7-celery-2.2.10/lib/python2.7/site-packages/celery/execute/", line 34, in trace
    return cls(states.SUCCESS, retval=fun(*args, **kwargs))
  File "/nix/store/dxvzsgk8skfvl7pp14wjn8v9sh97r776-python2.7-rhodecode-enterprise-ce-4.3.0+20160809x150712xcbe557819f37/lib/python2.7/site-packages/rhodecode/lib/celerylib/", line 130, in __call__
    return super(RhodecodeCeleryTask, self).__call__(*args, **kwargs)
  File "/nix/store/gjgiaqj5n9kvvmabxk79i3yf9m9172yf-python2.7-celery-2.2.10/lib/python2.7/site-packages/celery/task/", line 241, in __call__
    return*args, **kwargs)
  File "/nix/store/gjgiaqj5n9kvvmabxk79i3yf9m9172yf-python2.7-celery-2.2.10/lib/python2.7/site-packages/celery/app/", line 141, in run
    return fun(*args, **kwargs)
  File "<string>", line 2, in create_repo_fork
  File "/nix/store/dxvzsgk8skfvl7pp14wjn8v9sh97r776-python2.7-rhodecode-enterprise-ce-4.3.0+20160809x150712xcbe557819f37/lib/python2.7/site-packages/rhodecode/lib/celerylib/", line 203, in __wrapper
    ret = func(*fargs, **fkwargs)
  File "<string>", line 2, in create_repo_fork
  File "/nix/store/dxvzsgk8skfvl7pp14wjn8v9sh97r776-python2.7-rhodecode-enterprise-ce-4.3.0+20160809x150712xcbe557819f37/lib/python2.7/site-packages/rhodecode/lib/celerylib/", line 221, in __wrapper
  File "/nix/store/dxvzsgk8skfvl7pp14wjn8v9sh97r776-python2.7-rhodecode-enterprise-ce-4.3.0+20160809x150712xcbe557819f37/lib/python2.7/site-packages/rhodecode/config/", line 59, in configure_vcs
    conf.settings.HOOKS_DIRECT_CALLS = config['vcs.hooks.direct_calls']
  File "/nix/store/sb9n37049lc5dgny1jnhi92gxpxz134y-python2.7-Paste-2.0.2/lib/python2.7/site-packages/paste/", line 146, in __getitem__
    return self._current_obj()[key]
KeyError: 'vcs.hooks.direct_calls'

Updated by Martin Bornhold about 6 years ago

  • Status changed from New to In Progress

The setup of these settings is moved from load_environment to load_pyramid_environment. It looks like the setup of celery does not setup the pyramid layer correctly. This error does not occur on my local mashine. Do you have any hints on how to reproduce it? I assume that i have to activate celery in my config to get the error. Will try that but have to setup celeryd first ;)


Updated by Martin Bornhold almost 6 years ago

  • Status changed from In Progress to Resolved

The celery module now uses the fully prepared and sanitized settings from app init. Fix is included in


Updated by Johannes Bornhold almost 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF