D
D
Dmitry Vyatkin2016-08-23 22:51:11
Django
Dmitry Vyatkin, 2016-08-23 22:51:11

Why does celery start up but doesn't show up in processes?

Good evening! Please tell me what could be the problem, I try to run celery on the server with the command - ./manage.py celery worker -A myapp -l DEBUG and get this:

[2016-08-23 22:42:52,773: DEBUG/MainProcess] | Worker: Preparing bootsteps.
[2016-08-23 22:42:52,774: DEBUG/MainProcess] | Worker: Building graph...
[2016-08-23 22:42:52,775: DEBUG/MainProcess] | Worker: New boot order: {Timer, Hub, Queues (intra), Pool, Autoscaler, Beat, StateDB, Autoreloader, Consumer}
[2016-08-23 22:42:52,783: DEBUG/MainProcess] | Consumer: Preparing bootsteps.
[2016-08-23 22:42:52,783: DEBUG/MainProcess] | Consumer: Building graph...
[2016-08-23 22:42:52,791: DEBUG/MainProcess] | Consumer: New boot order: {Connection, Events, Mingle, Gossip, Agent, Heart, Tasks, Control, event loop}
 
 -------------- [email protected] v3.1.17 (Cipater)
---- **** ----- 
--- * ***  * -- Linux-2.6.32-042stab090.5-x86_64-with-centos-6.2-Final
-- * - **** --- 
- ** ---------- [config]
- ** ---------- .> app:         instagram_sync:0x1cb6910
- ** ---------- .> transport:   sqla+sqlite:///celerydb.sqlite
- ** ---------- .> results:     db+sqlite:///instagram-sync-celery.sqlite
- *** --- * --- .> concurrency: 8 (prefork)
-- ******* ---- 
--- ***** ----- [queues]
 -------------- .> celery           exchange=celery(direct) key=celery
                

[tasks]
  . celery.backend_cleanup
  . celery.chain
  . celery.chord
  . celery.chord_unlock
  . celery.chunks
  . celery.group
  . celery.map
  . celery.starmap
  . instagram_sync.celery.debug_task
  . photoloader.tasks.postprocess_cart
  . photoloader.tasks.postprocess_uploading_order
  . photoloader.tasks.test_task
  . photoloader.tasks.update_photos

[2016-08-23 22:42:52,795: DEBUG/MainProcess] | Worker: Starting Pool

ps aux | grep celery doesn't find anything. It turns out that celery starts and immediately exits and there is no information about errors in the logs, what could be the reason for this?
My config:
# Celery
#BROKER_URL = 'amqp://isync:[email protected]:5672/instagram_sync'

# Custom kombu serializer
from kombu.serialization import register
from .alt_json import (my_dumps, my_loads)

register('altjson', my_dumps, my_loads, content_type='application/x-json', content_encoding='utf-8')

CELERY_TIMEZONE = TIME_ZONE
CELERY_RESULT_BACKEND = 'db+sqlite:///instagram-sync-celery.sqlite'
CELERYD_STATE_DB = os.path.join(BASE_DIR, 'worker_db')
CELERY_ACCEPT_CONTENT = ['altjson']
CELERY_TASK_SERIALIZER = 'altjson'
CELERY_RESULT_SERIALIZER = 'altjson'

CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
#CELERY_ALWAYS_EAGER = False
BROKER_URL = 'sqla+sqlite:///celerydb.sqlite'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2016-08-24
@Nipheris

Maybe you need grep python? That binary, which is celery, seems to just run Python and pass the necessary arguments.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question