Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
celerytask
Commits
999bc964f476
Commit
4f5b841e
authored
Jan 29, 2019
by
Philippe Pepiot
Browse files
Move to new cube layout
parent
a69ff4eb44a4
Changes
25
Hide whitespace changes
Inline
Side-by-side
.hgignore
View file @
999bc964
i18n/es.po
i18n/de.po
syntax: glob
cubicweb_i18n/es.po
cubicweb_i18n/de.po
*.egg-info
dist
.pytest_cache
.tox
MANIFEST.in
View file @
999bc964
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
README
View file @
999bc964
...
...
@@ -71,7 +71,7 @@ Run a task:
.. code-block:: python
from cub
es.
celerytask.entities import start_async_task
from cub
icweb_
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
`cub
es.
celerytask.entities.get_tasks()` to introspect them and
`cub
es.
celerytask.entities.run_all_tasks()` to run them.
`cub
icweb_
celerytask.entities.get_tasks()` to introspect them and
`cub
icweb_
celerytask.entities.run_all_tasks()` to run them.
Also, CELERY_ALWAYS_EAGER and CELERY_EAGER_PROPAGATES_EXCEPTIONS are set to
True by default.
...
...
__init__.py
→
cubicweb_celerytask/
__init__.py
View file @
999bc964
File moved
__pkginfo__.py
→
cubicweb_celerytask/
__pkginfo__.py
View file @
999bc964
# 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
ccplugin.py
→
cubicweb_celerytask/
ccplugin.py
View file @
999bc964
...
...
@@ -25,7 +25,7 @@ import redis.exceptions
from
cubicweb.toolsutils
import
Command
from
cubicweb.server.serverconfig
import
ServerConfiguration
from
cubicweb.cwctl
import
CWCTL
from
cub
es.
celerytask.entities
import
sync_task_state
from
cub
icweb_
celerytask.entities
import
sync_task_state
from
cw_celerytask_helpers.monitor
import
MONITOR_KEY
from
cw_celerytask_helpers.utils
import
get_redis_client
...
...
data/cubes.celerytask.js
→
cubicweb_celerytask/
data/cubes.celerytask.js
View file @
999bc964
File moved
entities.py
→
cubicweb_celerytask/
entities.py
View file @
999bc964
...
...
@@ -29,7 +29,7 @@ from cubicweb.server.hook import DataOperationMixIn, Operation
from
cw_celerytask_helpers.filelogger
import
get_task_logs
from
cub
es.
celerytask
import
STATES
,
FINAL_STATES
from
cub
icweb_
celerytask
import
STATES
,
FINAL_STATES
_
=
six
.
text_type
...
...
hooks.py
→
cubicweb_celerytask/
hooks.py
View file @
999bc964
File moved
i18n/en.po
→
cubicweb_celerytask/
i18n/en.po
View file @
999bc964
File moved
i18n/fr.po
→
cubicweb_celerytask/
i18n/fr.po
View file @
999bc964
File moved
migration/0.4.0_Any.py
→
cubicweb_celerytask/
migration/0.4.0_Any.py
View file @
999bc964
File moved
migration/0.6.0_Any.py
→
cubicweb_celerytask/
migration/0.6.0_Any.py
View file @
999bc964
from
cub
es.
celerytask.migration.utils
import
migrate_task_logs_to_bfss
from
cub
icweb_
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'
)
migration/__init__.py
→
cubicweb_celerytask/
migration/__init__.py
View file @
999bc964
File moved
migration/postcreate.py
→
cubicweb_celerytask/
migration/postcreate.py
View file @
999bc964
File moved
migration/utils.py
→
cubicweb_celerytask/
migration/utils.py
View file @
999bc964
File moved
schema.py
→
cubicweb_celerytask/
schema.py
View file @
999bc964
File moved
site_cubicweb.py
→
cubicweb_celerytask/
site_cubicweb.py
View file @
999bc964
File moved
testutils.py
→
cubicweb_celerytask/
testutils.py
View file @
999bc964
...
...
@@ -27,7 +27,7 @@ import celery.result
from
celery.bin.worker
import
worker
as
celery_worker
from
cubicweb.devtools
import
testlib
from
cub
es.
celerytask.ccplugin
import
CeleryMonitorCommand
from
cub
icweb_
celerytask.ccplugin
import
CeleryMonitorCommand
class
BaseCeleryTaskTC
(
testlib
.
CubicWebTC
):
...
...
views.py
→
cubicweb_celerytask/
views.py
View file @
999bc964
...
...
@@ -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
cub
es.
celerytask
import
STATES
from
cub
icweb_
celerytask
import
STATES
_
=
six
.
text_type
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment