a***@gmail.com
2018-09-25 07:05:04 UTC
my tasks is empty
@celery.on_after_configure.connect
def setup_periodic_tasks(sender, **kwargs):
pass
# sender.add_periodic_task(crontab(minute="*/5"),
restore_finance_data.s())
# sender.add_periodic_task(crontab(minute="*/20"), finance_task.s())
# sender.add_periodic_task(crontab(minute="31,47", hour="*/1"),
refund_data_task.s())
like this!
but i still receive task when i turn on the celery!
(venv) ***@ubuntu:~/www/knowdo$ celery worker -A periodic_task.celery --
loglevel=info
/home/toloog/www/data_center_test/venv/lib/python3.6/site-packages/
flask_sqlalchemy/__init__.py:794: FSADeprecationWarning:
SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be
disabled by default in the future. Set it to True or False to suppress this
warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
-------------- ***@ubuntu v4.1.0 (latentcall)
---- **** -----
--- * *** * -- Linux-4.15.0-33-generic-x86_64-with-Ubuntu-18.04-bionic 2018
-09-25 06:47:50
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: app:0x7f6f025ab588
- ** ---------- .> transport: redis://localhost:6379/0
- ** ---------- .> results: redis://localhost:6379/0
- *** --- * --- .> concurrency: 12 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this
worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
[2018-09-25 06:47:51,691: INFO/MainProcess] Connected to redis:
//localhost:6379/0
[2018-09-25 06:47:51,702: INFO/MainProcess] mingle: searching for neighbors
[2018-09-25 06:47:52,725: INFO/MainProcess] mingle: all alone
[2018-09-25 06:47:52,738: INFO/MainProcess] ***@ubuntu ready.
[2018-09-25 06:47:52,877: ERROR/MainProcess] Received unregistered task of
type 'app.api.task.finance_task'.
The message has been ignored and discarded.
Did you remember to import the module containing this task?
Or maybe you're using relative imports?
Please see
http://docs.celeryq.org/en/latest/internals/protocol.html
for more information.
The full contents of the message body was:
b'[[], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord":
null}]' (77b)
Traceback (most recent call last):
File
"/home/toloog/www/data_center_test/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 561, in on_task_received
strategy = strategies[type_]
KeyError: 'app.api.task.finance_task'
before this i had run a few time of finance_task function but today i had
turn off the function,than is still work?
any one know it ???
@celery.on_after_configure.connect
def setup_periodic_tasks(sender, **kwargs):
pass
# sender.add_periodic_task(crontab(minute="*/5"),
restore_finance_data.s())
# sender.add_periodic_task(crontab(minute="*/20"), finance_task.s())
# sender.add_periodic_task(crontab(minute="31,47", hour="*/1"),
refund_data_task.s())
like this!
but i still receive task when i turn on the celery!
(venv) ***@ubuntu:~/www/knowdo$ celery worker -A periodic_task.celery --
loglevel=info
/home/toloog/www/data_center_test/venv/lib/python3.6/site-packages/
flask_sqlalchemy/__init__.py:794: FSADeprecationWarning:
SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be
disabled by default in the future. Set it to True or False to suppress this
warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
-------------- ***@ubuntu v4.1.0 (latentcall)
---- **** -----
--- * *** * -- Linux-4.15.0-33-generic-x86_64-with-Ubuntu-18.04-bionic 2018
-09-25 06:47:50
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: app:0x7f6f025ab588
- ** ---------- .> transport: redis://localhost:6379/0
- ** ---------- .> results: redis://localhost:6379/0
- *** --- * --- .> concurrency: 12 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this
worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[tasks]
[2018-09-25 06:47:51,691: INFO/MainProcess] Connected to redis:
//localhost:6379/0
[2018-09-25 06:47:51,702: INFO/MainProcess] mingle: searching for neighbors
[2018-09-25 06:47:52,725: INFO/MainProcess] mingle: all alone
[2018-09-25 06:47:52,738: INFO/MainProcess] ***@ubuntu ready.
[2018-09-25 06:47:52,877: ERROR/MainProcess] Received unregistered task of
type 'app.api.task.finance_task'.
The message has been ignored and discarded.
Did you remember to import the module containing this task?
Or maybe you're using relative imports?
Please see
http://docs.celeryq.org/en/latest/internals/protocol.html
for more information.
The full contents of the message body was:
b'[[], {}, {"callbacks": null, "errbacks": null, "chain": null, "chord":
null}]' (77b)
Traceback (most recent call last):
File
"/home/toloog/www/data_center_test/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 561, in on_task_received
strategy = strategies[type_]
KeyError: 'app.api.task.finance_task'
before this i had run a few time of finance_task function but today i had
turn off the function,than is still work?
any one know it ???
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to celery-users+***@googlegroups.com.
To post to this group, send email to celery-***@googlegroups.com.
Visit this group at https://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "celery-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to celery-users+***@googlegroups.com.
To post to this group, send email to celery-***@googlegroups.com.
Visit this group at https://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.