Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

celeryd_multi dies on python 2.5 #367

Closed
frac opened this issue Mar 31, 2011 · 1 comment
Closed

celeryd_multi dies on python 2.5 #367

frac opened this issue Mar 31, 2011 · 1 comment

Comments

@frac
Copy link
Contributor

frac commented Mar 31, 2011

Using python 2.5 environments the celeryd_multi dies without complaining

for exemple using pypy

fractal@ada:~/foobar$ /opt/pypy-1.4.1-linux64/bin/celeryd-multi start w1
celeryd-multi v2.2.5
> Starting nodes...
        > w1.ada: OK
fractal@ada:~/foobar$ ls
celeryd@w1.log
fractal@ada:~/foobar$ cat celeryd@w1.log 
fractal@ada:~/foobar$ 

if you use --verbose and get the replace celeryd_detach for celeryd

you get finally this error:

fractal@ada:~/foobar$ /usr/local/bin/pypy -m celery.bin.celeryd --pidfile=celeryd@w1.pid -n w1.ada --logfile=celeryd@w1.log
/opt/pypy-1.4.1-linux64/site-packages/celery/loaders/default.py:54: NotConfigured: No 'celeryconfig' module found! Please make sure it exists and is available to Python.
  "is available to Python." % (configname, )))
Traceback (most recent call last):
  File "app_main.py", line 53, in run_toplevel
  File "app_main.py", line 492, in run_it
  File "/opt/pypy-1.4.1-linux64/lib_pypy/runpy.py", line 435, in run_module
    filename, loader, alter_sys)
  File "/opt/pypy-1.4.1-linux64/lib_pypy/runpy.py", line 400, in _run_module_code
    mod_name, mod_fname, mod_loader)
  File "/opt/pypy-1.4.1-linux64/lib_pypy/runpy.py", line 378, in _run_code
    exec code in run_globals
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/bin/celeryd.py", line 208, in <module>
    main()
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/bin/celeryd.py", line 187, in main
    worker.execute_from_commandline()
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/bin/base.py", line 72, in execute_from_commandline
    return self.handle_argv(prog_name, argv[1:])
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/bin/base.py", line 100, in handle_argv
    return self.run(*args, **vars(options))
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/bin/celeryd.py", line 96, in run
    return self.app.Worker(**kwargs).run()
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/apps/worker.py", line 120, in run
    self.redirect_stdouts_to_logger()
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/apps/worker.py", line 163, in redirect_stdouts_to_logger
    logfile=self.logfile)
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/log.py", line 124, in setup_logging_subsystem
    colorize, **kwargs)
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/log.py", line 211, in _setup_logger
    handler = self._detect_handler(logfile)
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/log.py", line 136, in _detect_handler
    return WatchedFileHandler(logfile)
  File "/opt/pypy-1.4.1-linux64/site-packages/celery/utils/compat.py", line 520, in __init__
    encoding, delay)
TypeError: __init__() takes at most 4 arguments (5 given)

It is due to changes in 2.6 in the logging.FileHandle

http://docs.python.org/library/logging.html#filehandler

 Changed in version 2.6: delay was added.

I've made a patch and I'm sending a pull request.

btw thanks for the amazing product

@frac
Copy link
Contributor Author

frac commented Apr 1, 2011

WatchedFileHandler: Fixes Python <= 2.5 compat. Closed by ae9d081.

@ask ask closed this as completed Apr 1, 2011
orb pushed a commit to orb/celery that referenced this issue Apr 27, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants