Commit 4f5b841e authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

Move to new cube layout

parent a69ff4eb44a4
i18n/es.po
i18n/de.po
syntax: glob
cubicweb_i18n/es.po
cubicweb_i18n/de.po
*.egg-info
dist
.pytest_cache
.tox
include *.py
include */*.py
recursive-include helpers *
recursive-include data *.gif *.png *.ico *.css *.js
recursive-include i18n *.po
recursive-include wdoc *
recursive-include cubicweb_celerytask *.py
recursive-include cubicweb_celerytask/data *.gif *.png *.ico *.css *.js
recursive-include cubicweb_celerytask/i18n *.po
recursive-include cubicweb_celerytask/wdoc *
recursive-include test/data bootstrap_cubes *.py
include *.ini
recursive-include debian changelog compat control copyright rules
include cubicweb-%(cubename)s.spec
......@@ -71,7 +71,7 @@ Run a task:
.. code-block:: python
from cubes.celerytask.entities import start_async_task
from cubicweb_celerytask.entities import start_async_task
cwtask = start_async_task(cnx, 'hi_there', 'THERE', kw=42)
cnx.commit()
......@@ -94,8 +94,8 @@ Testing task based application
------------------------------
In CubicWeb test mode, tasks don't run automatically, use
`cubes.celerytask.entities.get_tasks()` to introspect them and
`cubes.celerytask.entities.run_all_tasks()` to run them.
`cubicweb_celerytask.entities.get_tasks()` to introspect them and
`cubicweb_celerytask.entities.run_all_tasks()` to run them.
Also, CELERY_ALWAYS_EAGER and CELERY_EAGER_PROPAGATES_EXCEPTIONS are set to
True by default.
......
# pylint: disable=W0622
"""cubicweb-celerytask application packaging information"""
from os import listdir as _listdir
from os.path import join, isdir
from glob import glob
modname = 'celerytask'
modname = 'cubicweb_celerytask'
distname = 'cubicweb-celerytask'
numversion = (0, 6, 1)
......@@ -32,25 +28,3 @@ classifiers = [
'Programming Language :: Python',
'Programming Language :: JavaScript',
]
THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
def listdir(dirpath):
return [join(dirpath, fname) for fname in _listdir(dirpath)
if fname[0] != '.' and not fname.endswith('.pyc') and
not fname.endswith('~') and
not isdir(join(dirpath, fname))]
data_files = [
# common files
[THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
]
# check for possible extended cube layout
for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data',
'wdoc', 'i18n', 'migration'):
if isdir(dname):
data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
# Note: here, you'll need to add subdirectories if you want
# them to be included in the debian package
......@@ -25,7 +25,7 @@ import redis.exceptions
from cubicweb.toolsutils import Command
from cubicweb.server.serverconfig import ServerConfiguration
from cubicweb.cwctl import CWCTL
from cubes.celerytask.entities import sync_task_state
from cubicweb_celerytask.entities import sync_task_state
from cw_celerytask_helpers.monitor import MONITOR_KEY
from cw_celerytask_helpers.utils import get_redis_client
......
......@@ -29,7 +29,7 @@ from cubicweb.server.hook import DataOperationMixIn, Operation
from cw_celerytask_helpers.filelogger import get_task_logs
from cubes.celerytask import STATES, FINAL_STATES
from cubicweb_celerytask import STATES, FINAL_STATES
_ = six.text_type
......
from cubes.celerytask.migration.utils import migrate_task_logs_to_bfss
from cubicweb_celerytask.migration.utils import migrate_task_logs_to_bfss
option_added('celerytask-log-dir')
migrate_task_logs_to_bfss(cnx)
drop_attribute('CeleryTask', 'task_logs')
......@@ -27,7 +27,7 @@ import celery.result
from celery.bin.worker import worker as celery_worker
from cubicweb.devtools import testlib
from cubes.celerytask.ccplugin import CeleryMonitorCommand
from cubicweb_celerytask.ccplugin import CeleryMonitorCommand
class BaseCeleryTaskTC(testlib.CubicWebTC):
......
......@@ -32,7 +32,7 @@ from cubicweb.web.views import uicfg, tabs
from cubicweb.web.views.cwsources import LogTable, LogTableLayout
from cubicweb.web.views.json import JsonMixIn
from cubes.celerytask import STATES
from cubicweb_celerytask import STATES
_ = six.text_type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment