معرفی شرکت ها


cubicweb-celery-1.1.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Celery cube
ویژگی مقدار
سیستم عامل -
نام فایل cubicweb-celery-1.1.0
نام cubicweb-celery
نسخه کتابخانه 1.1.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Logilab
ایمیل نویسنده contact@logilab.fr
آدرس صفحه اصلی https://forge.extranet.logilab.fr/cubicweb/cubes/celery
آدرس اینترنتی https://pypi.org/project/cubicweb-celery/
مجوز LGPL
=============== CubicWeb Celery =============== Celery integration with CubicWeb Getting Started --------------- Enable the 'celery' cube in your ``myapp`` cubicweb instance:: $ cubicweb-ctl shell myapp entering the migration python shell just type migration commands or arbitrary python code and type ENTER to execute it type "exit" or Ctrl-D to quit the shell and resume operation >>> add_cube('celery') >>> ^D If needed, configure the broker_url in ``all-in-one.conf``. By default, and only when using a postgresql database, the trunk_ transport will be used for the broker; make sure it is installed. .. _trunk: https://github.com/cyberdelia/trunk Write a task:: from cubicweb_celery import app @app.cwtask def ping(self): return 'pong' @app.cwtask def users(self): return [str(x[0]) for x in self.cw_cnx.execute('String L WHERE U login L')] or as a class:: from cubicweb_celery import app class MyTask(app.Task): need_cnx = True # if false (the default), self.cw_cnx will not be set # before running the task def run(self): self.cw_cnx.execute('Any X WHERE ...') .. Note:: In order to have the task automatically available by the celery worker, you must ensure that it is in a Python file that is automatically loaded by CubicWeb, best candidate being the ``sobjects`` module of a cube (see the `CubicWeb's regitry documentation`_). Then start a celery worker:: celery -A cubicweb_celery -i INSTANCE_NAME worker [ --beat ] Then you can make the worker execute a task by calling it, eg. from an Operation_. You may also run a task from a ``cubicweb-ctl shell``:: $ cubicweb-ctl shell myapp >>> from cubes.myapp.sobjects import ping, users >>> print ping.delay().wait() 'pong' >>> print users.delay().wait() ['anon', 'admin'] .. _`CubicWeb's regitry documentation`: https://docs.cubicweb.org/book/intro/concepts.html#the-registry .. _Operation: https://docs.cubicweb.org/book/devrepo/repo/hooks.html#operations


نیازمندی

مقدار نام
~=5.0 celery
<3.39.0,>=3.38.0 cubicweb


نحوه نصب


نصب پکیج whl cubicweb-celery-1.1.0:

    pip install cubicweb-celery-1.1.0.whl


نصب پکیج tar.gz cubicweb-celery-1.1.0:

    pip install cubicweb-celery-1.1.0.tar.gz