GithubHelp home page GithubHelp logo

How can i get var_dump about celery-php HOT 10 CLOSED

gjedeer avatar gjedeer commented on May 25, 2024
How can i get var_dump

from celery-php.

Comments (10)

gjedeer avatar gjedeer commented on May 25, 2024 1

Hi,

If you want to print some internal variable from AsyncResult object, just print it directly (echo $result->variable)

More likely, what you want to print is value returned from AsyncResult::get()

On July 18, 2016 6:20:07 AM CEST, anhnvname [email protected] wrote:

Hello,

How can i dump result from worker ?

My worker in python
#demo.py
from celery import Celery celery = Celery('tasks', broker='amqp://guest:guest@localhost:5672//') @celery.task(queue='demo', name='add') def add(x, y): return x + y

My php script
require 'celery-php/celery.php'; $c = new Celery('localhost', 'guest', 'guest', '/'); $result = $c->PostTask('tasks.add', array(2,2));

but when i use var_dump($result); i can't dump result from woker.
In terminal show
Received task: tasks.add[php_52b1759141a8b3.43107845] Task tasks.add[php_52b1759141a8b3.43107845] succeeded in 0.000701383920386s: 4

Show what i wrong some thing ?

Thanks so much !


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#75

Sent from my Android device with K-9 Mail. Please excuse my brevity.

from celery-php.

anhnvme avatar anhnvme commented on May 25, 2024

Hello,

Can u write some example ?
I have tried many ways but it show nothing.

from celery-php.

gjedeer avatar gjedeer commented on May 25, 2024

Just see readme.md please. Or the unittest directory. Both have examples.

On July 18, 2016 11:43:42 AM CEST, anhnvname [email protected] wrote:

Hello,

Can u write some example ?
I try many ways but can't show anything.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#75 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

from celery-php.

anhnvme avatar anhnvme commented on May 25, 2024

Hello,

Before i made question, i'm tried many way, so. please help me

I want use php to show result from worker celery

All way from readme.md and test folder not working. it's show nothing

from celery-php.

gjedeer avatar gjedeer commented on May 25, 2024

Ddi you try using an alphanumeric vhost name instead of "/"? If you don't know Celery too well, try following the examples more closely - use the connection details from examples, then move to your own values when examples work OK.

On July 18, 2016 12:20:41 PM CEST, anhnvname [email protected] wrote:

Hello,

Before i made question, i'm tried many way, so. please help me

I want use php to show result from worker celery

All way from readme.md and test folder not working. it's show nothing


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#75 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

from celery-php.

anhnvme avatar anhnvme commented on May 25, 2024

Thanks for reply
I post my worker script and php script above, could u help me check it ?
Very close with example

from celery-php.

gjedeer avatar gjedeer commented on May 25, 2024

So it doesn't work with an alphanumeric vhost name?

On July 18, 2016 12:43:58 PM CEST, anhnvname [email protected] wrote:

Thanks for reply
I post my worker script and php script above, could u help me check it
?
Very close with example


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#75 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

from celery-php.

anhnvme avatar anhnvme commented on May 25, 2024

Thanks for support, It's worked !

from celery-php.

gjedeer avatar gjedeer commented on May 25, 2024

Call getCompleteResult()

On July 19, 2016 6:04:13 AM CEST, anhnvname [email protected] wrote:

Hello,

How can i get original result ?, not json_decode ?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#75 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

from celery-php.

anhnvme avatar anhnvme commented on May 25, 2024

Thanks again, Everything work correctly !

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.