Extracting Django-Celery Significant drift from warning message

So, I develop using a virtual machine (tramp), and I get this message when I start celery in it:

[2014-07-15 10:16:49,627: INFO/MainProcess] beat: Starting...
[W 140715 09:16:51 state:74] Substantial drift from celery@worker_publications may mean clocks are out of sync.  Current drift is
    3600 seconds.  [orig: 2014-07-15 09:16:51.476125 recv: 2014-07-15 10:16:51.474109]

[W 140715 09:16:51 state:74] Substantial drift from celery@worker_queue may mean clocks are out of sync.  Current drift is
    3600 seconds.  [orig: 2014-07-15 09:16:51.480642 recv: 2014-07-15 10:16:51.475021]

When I make a date inside, I get Tue Jul 15 09:25:11 UTC 2014, but I live in Portugal and my main car gives me Ter Jul 15 10:25:39 WEST 2014.

What is the best approach for me to fix?

How about when I put it live?

I use celery 3.1.12and I do not have a set CELERY_TIME_ZONE.

+4
source share
2 answers

, django . , ( )

( ec2 digitalocean)

sudo apt-get install ntp
sudo /etc/init.d/ntp restart

, , Django

TIME_ZONE = 'America/Los_Angeles'
TZINFO = 'UTC'
USE_TZ = True

# For celery
CELERY_ENABLE_UTC = True

pip freeze

django-celery==3.1.16
Django==1.6
celery==3.1.8
+1

. , 3600 = .

, , CELERY_TIMEZONE, CELERY_TIME_ZONE.

0

Source: https://habr.com/ru/post/1548460/


All Articles