On Wednesday, August 3, 2016 at 6:03:57 PM UTC+5:30, VRS Rajkot wrote:
>
>
>
> On Wednesday, August 3, 2016 at 10:44:36 AM UTC+5:30, VRS Rajkot wrote:
>>
>>
>> hi,
>> In my local environment i used celery for schedule task it works in local
>> i user redis as a worker
>> now i want to configure django celery in heroku server
>> i try to used herok-redis addons in heroku
>> after i add following settings in my settings.py
>>
>> r = redis.from_url(os.environ.get("REDIS_URL"))
>> BROKER_URL = redis.from_url(os.environ.get("REDIS_URL"))
>> CELERY_RESULT_BACKEND = os.environ.get('REDIS_URL')
>> CELERY_ACCEPT_CONTENT = ['application/json']
>> CELERY_TASK_SERIALIZER = 'json'
>> CELERY_RESULT_SERIALIZER = 'json'
>> CELERY_TIMEZONE = 'Canada/Eastern'
>>
>>
>>
>>
>>
>>
>> redis_url = urlparse.urlparse(os.environ.get('REDIS_URL'))
>> CACHES = {
>> "default": {
>> "BACKEND": "redis_cache.RedisCache",
>> "LOCATION": "{0}:{1}".format(redis_url.hostname, redis_url.port),
>> "OPTIONS": {
>> "PASSWORD": redis_url.password,
>> "DB": 0,
>> }
>> }
>> }
>>
>>
>> after in my procfile i added
>> web: gunicorn bizbii.wsgi --log-file -
>> worker : celery workder -A tasks.app -l INFO
>> python manage.py celeryd -v 2 -B -s celery -E -l INFO
>>
>> after that create dyno with this command
>>
>
> heroku run bash -a bizbii2
>
> and then run this command
> python manage.py celeryd -v 2 -B -s celery -E -l INFO
> so it return error like
>
[2016-08-03 08:23:26,506: ERROR/Beat] beat: Connection error: [Errno 111]
Connection refused. Trying again in 8.0 seconds...
[2016-08-03 08:23:26,843: ERROR/MainProcess] consumer: Cannot connect to
amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.
Trying again in 8.00 seconds...
--
--
You received this message because you are subscribed to the Google
Groups "Heroku" group.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.