Giter Club home page Giter Club logo

celery's Introduction

DEPRECATED

This image is officially deprecated in favor of the standard python image, and will receive no further updates after 2017-06-01 (Jun 01, 2017). Please adjust your usage accordingly.

See the discussion in docker-library/celery#1 and docker-library/celery#12 for more details.

In most cases, using this image required re-installation of application dependencies, so for most applications it ends up being much cleaner to simply install Celery in the application container, and run it via a second command.

See the way the sentry image handles running a Celery beat and workers for a concrete example of this pattern being employed (docker run -d --name sentry-cron ... sentry run cron and docker run -d --name sentry-worker-1 ... sentry run worker).

About this Repo

This is the Git repo of the Docker official image for celery. See the Docker Hub page for the full readme on how to use this Docker image and for information regarding contributing and issues.

The full readme is generated over in docker-library/docs, specifically in docker-library/docs/celery.

See a change merged here that doesn't show up on the Docker Hub yet? Check the "library/celery" manifest file in the docker-library/official-images repo, especially PRs with the "library/celery" label on that repo. For more information about the official images process, see the docker-library/official-images readme.


celery's People

Contributors

docker-library-bot avatar tianon avatar yosifkit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

celery's Issues

Deprecation?

I'm opening this as a call for users to come out and "make their case", so to speak. Given increased understanding of how Celery is used, the consensus appears to be coming back to this image not holding much value by itself, and there being more value in folks embedding Celery in their application containers directory (exactly like Sentry does, for example).

If I've got some gross misunderstanding of how Celery is supposed to be used, I'd love to see some documentation to help me understand. πŸ˜‡ ❀️

Way to run tasks

Hi, I don't know how to run tasks by using this Dockerfile.

  • Where should I place tasks.py file to register tasks to run?
  • How can I notice new tasks for this container?

If you know, please tell me. πŸ˜ƒ

DecodeError when passing Django task to Celery

I'm passing a task from my Django app to a Celery container (through rabbit-mq) but I keep getting the error below.
I've check that the LANG var is set to UTF8 (actually C.UTF8 in this case) but I haven’t found any other solutions when searching online which is why I'm posting here.

If anyone can see what the problem is I'd be most grateful.

[2015-09-17 23:13:33,486: CRITICAL/MainProcess] Can't decode message body: DecodeError(UnicodeDecodeError('ascii', b'\xe7\xc07\xf1\xfff\x14\x8ec\x1c\xc5\xf9\x86\xed\x86\x9a<\xe3M\xa0]x\x80\xd8;\xd5B&+8\xeab', 0, 1, 'ordinal not in range(128)'),) [type:'application/x-python-serialize' encoding:'binary' headers:{}]

body: b'\x80\x02}q\x01(U\x07expiresq\x02NU\x03utcq\x03\x88U\x04argsq\x04cpycoin.key.BIP32Node\nBIP32Node\nq\x05)\x81q\x06}q\x07(U\x06_depthq\x08K\x00U\x14_prefer_uncompressedq\t\x89U\x15_hash160_uncompressedq\nNU\x10_secret_exponentq\x0bNU\r_subkey_cacheq\x0c}U\x08_netcodeq\rU\x03BTCq\x0eU\x13_hash160_compressedq\x0fNU\x0b_chain_codeq\x10U \xe7\xc07\xf1\xfff\x14\x8ec\x1c\xc5\xf9\x86\xed\x86\x9a<\xe3M\xa0]x\x80\xd8;\xd5B&+8\xeabU\x0c_public_pairq\x11\x8a... (928b)
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 55, in _reraise_errors
    yield
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 184, in loads
    return decode(data)
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 345, in unpickle
    return pickle_loads(str_to_bytes(s))
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 64, in pickle_loads
    return load(BytesIO(s))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 0: ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/kombu/messaging.py", line 590, in _receive_callback
    decoded = None if on_m else message.decode()
  File "/usr/local/lib/python3.4/site-packages/kombu/message.py", line 142, in decode
    self.content_encoding, accept=self.accept)
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 184, in loads
    return decode(data)
  File "/usr/local/lib/python3.4/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 59, in _reraise_errors
    reraise(wrapper, wrapper(exc), sys.exc_info()[2])
  File "/usr/local/lib/python3.4/site-packages/kombu/five.py", line 132, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 55, in _reraise_errors
    yield
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 184, in loads
    return decode(data)
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 345, in unpickle
    return pickle_loads(str_to_bytes(s))
  File "/usr/local/lib/python3.4/site-packages/kombu/serialization.py", line 64, in pickle_loads
    return load(BytesIO(s))
kombu.exceptions.DecodeError: 'ascii' codec can't decode byte 0xe7 in position 0: ordinal not in range(128)

Thanks in advance :)

Install Boto for SQS capabilties?

I understand that it's not a core feature, but, in order to use SQS w/this image, I need boto installed in addition to Celery. Thanks!

Keyerror when importing .pyc files

I'm trying to only mount the essential files into the container from the outside like so:

-v /celeryconfig.py:/home/user/celeryconfig.py:ro \
-v /cpop/cpop/settings.py:/home/user/cpop/settings.py:ro \
-v /cpop/popsite/tasks.py:/home/user/popsite/tasks.py:ro

which works fine.
problem is if i compile the .py files into .pyc and change the mount options like so:

-v /celeryconfig.pyc:/home/user/celeryconfig.pyc:ro \
-v /cpop/cpop/settings.pyc:/home/user/cpop/settings.pyc:ro \
-v /cpop/popsite/tasks.pyc:/home/user/popsite/tasks.pyc:ro

it breaks.
Can anyone suggest why this might be?

BROKER_URL !== CELERY_BROKER_URL

Thanks for all the great work making this image available - posting this in case anyone else has this issue.

The README for this image doesn't make it clear that BROKER_URL is deprecated in favour of CELERY_BROKER_URL.

The Celery configuration documentation makes no mention of CELERY_BROKER_URL - all examples use BROKER_URL.

If you rename your RabbitMQ service to anything but "rabbit" in your docker-compose.yml, and try (according to the configuration docs) to set BROKER_URL accordingly, this image won't work.

I will cross-post this issue on the Celery documentation site.

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.