GithubHelp home page GithubHelp logo

Comments (7)

gjedeer avatar gjedeer commented on June 5, 2024

No, this is impossible right now. Celery-php currently only connects to AMQP backend.

from celery-php.

wuhsien avatar wuhsien commented on June 5, 2024

Ok ! thanks. :)

from celery-php.

lankesh avatar lankesh commented on June 5, 2024

Hi.
In my case I cannot have AMQP backend. I will have to use redis. So can you suggest any work around for fetching the result. I mean is their any way I can use PRedis to do this for me. Or maybe there is some other way.

from celery-php.

gjedeer avatar gjedeer commented on June 5, 2024

@lankesh Redis is supported now. See this for how to instantiate the object:

https://github.com/gjedeer/celery-php/blob/master/unittest/CeleryRedisTest.php

from celery-php.

lankesh avatar lankesh commented on June 5, 2024

Sorry if this is a stupid question. But actually I instantiated my celery object with these settings only. But still I am not able to get the result back. It keeps on throwing this exception:

'AMQP task proj.tasks.hello(["hello world"]) did not return after 10 seconds'

What am I doing wrong here?

Following is my celery.py file:

from future import absolute_import
from celery import Celery

app = Celery('proj',
broker='redis://localhost:6379/0',
backend='redis://',
include=['proj.tasks'])

app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_ACCEPT_CONTENT = ['json']
)

if name == 'main':
app.start()


Following is my tasks.py file:

from future import absolute_import
from proj.celery import app

@app.task
def hello(helloWorld):
return helloWorld


from celery-php.

gjedeer avatar gjedeer commented on June 5, 2024

You're certainly missing serializer and the result backend has strange format too. See:

https://github.com/gjedeer/celery-php/blob/master/testscenario/celeryredisconfig.py

from celery-php.

lankesh avatar lankesh commented on June 5, 2024

Thanks a million. I cannot thank you more.
It is working now. Actually I am a total newbie to both celery and redis.

Thank you for your time.

cheers 👍

from celery-php.

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.