Ver código fonte

Remove old pythonproject example

Ask Solem 12 anos atrás
pai
commit
18896aa9f2

+ 0 - 37
examples/pythonproject/demoapp/README.rst

@@ -1,37 +0,0 @@
-======================================
- Example Python project using Celery
-======================================
-
-
-Modules
--------
-
-    * celeryconfig.py
-
-        The celery configuration module.
-
-    * tasks.py
-
-        Tasks are defined in this module. This module is automatically
-        imported by the worker because it's listed in
-        celeryconfig's `CELERY_IMPORTS` directive.
-
-    * test.py
-
-        Simple test program running tasks.
-
-
-
-Running
--------
-
-
-Open up two terminals, in the first you run:
-
-    $ celeryd --loglevel=INFO
-
-In the other you run the test program:
-
-    $ python ./test.py
-
-Voila, you've executed some tasks!

+ 0 - 0
examples/pythonproject/demoapp/__init__.py


+ 0 - 14
examples/pythonproject/demoapp/celeryconfig.py

@@ -1,14 +0,0 @@
-import sys
-import os
-sys.path.insert(0, os.getcwd())
-
-BROKER_URL = "amqp://guest:guest@localhost:5672//"
-
-CELERY_IMPORTS = ("tasks", )
-
-## Using the database to store results
-# CELERY_RESULT_BACKEND = "database"
-# CELERY_RESULT_DBURI = "sqlite:///celerydb.sqlite"
-
-# Results published as messages (requires AMQP).
-CELERY_RESULT_BACKEND = "amqp"

+ 0 - 11
examples/pythonproject/demoapp/tasks.py

@@ -1,11 +0,0 @@
-from celery.task import task
-
-
-@task()
-def add(x, y):
-    return x + y
-
-
-@task()
-def mul(x, y):
-    return x * y

+ 0 - 15
examples/pythonproject/demoapp/test.py

@@ -1,15 +0,0 @@
-from tasks import add
-
-
-print(">>> from tasks import add")
-print(">>> add(4, 4)")
-res = add(4, 4)
-print(repr(res))
-
-print(">>> add.delay(4, 4)")
-res = add.delay(4, 4)
-print(repr(res))
-
-print(">>> add.delay(4, 4).wait()")
-res = add.delay(4, 4).wait()
-print(repr(res))