@@ -18,7 +18,7 @@ Last Celery version tested is 3.1.19
18
18
19
19
## POSTING TASKS
20
20
21
- $c = new Celery('localhost', 'myuser', 'mypass', 'myvhost');
21
+ $c = new \Celery\ Celery('localhost', 'myuser', 'mypass', 'myvhost');
22
22
$result = $c->PostTask('tasks.add', array(2,2));
23
23
24
24
// The results are serializable so you can do the following:
@@ -46,14 +46,14 @@ _tip: if using RabbitMQ guest user, set "/" vhost_
46
46
}
47
47
48
48
## GET ASYNC RESULT MESSAGE
49
- $c = new Celery('localhost', 'myuser', 'mypass', 'myvhost');
49
+ $c = new \Celery\ Celery('localhost', 'myuser', 'mypass', 'myvhost');
50
50
$message = $c->getAsyncResultMessage('tasks.add', 'taskId');
51
51
52
52
## PYTHON-LIKE API
53
53
54
54
An API compatible to AsyncResult in Python is available too.
55
55
56
- $c = new Celery('localhost', 'myuser', 'mypass', 'myvhost');
56
+ $c = new \Celery\ Celery('localhost', 'myuser', 'mypass', 'myvhost');
57
57
$result = $c->PostTask('tasks.add', array(2,2));
58
58
59
59
$result->get();
@@ -84,13 +84,13 @@ create a celery object with ssl options:
84
84
'CN_match' => 'CERT_COMMON_NAME'
85
85
);
86
86
87
- $c = new Celery($host, $user, $password, $vhost, 'celery', 'celery', 5671, false, false, $ssl_options);
87
+ $c = new \Celery\ Celery($host, $user, $password, $vhost, 'celery', 'celery', 5671, false, false, $ssl_options);
88
88
89
89
## CONNECTING TO REDIS
90
90
91
91
Refer to files in testscenario/ for examples of celeryconfig.py.
92
92
93
- $c = new Celery(
93
+ $c = new \Celery\ Celery(
94
94
'localhost', /* Server */
95
95
'', /* Login */
96
96
'test', /* Password */
0 commit comments