Yes, I guess that's good enough. Thanks for helping out! :-)

Regards,
Ankush Thakur

On Fri, Jul 22, 2016 at 10:54 PM, George Silva <[email protected]>
wrote:

> I'm familiar with the two ways I've explained to you. I'm not sure if
> there are others.
>
> Actually, it's a single place where you have to define the variables (the
> supervisor conf) so I don't think it's that bad.
>
>
>
> On Fri, Jul 22, 2016 at 2:18 PM, Ankush Thakur <[email protected]>
> wrote:
>
>> Unfortunately the docs are anything but beginner-friendly on Celery +
>> Supervisor:
>> http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#supervisord
>> If you follow the link, you land on a GitHub page with three files and no
>> explanations. :(
>>
>> Besides, if you see
>> https://github.com/celery/celery/blob/3.1/extra/supervisord/celeryd.conf,
>> there's no mention of environment variables.
>>
>>
>> Regards,
>> Ankush Thakur
>>
>> On Fri, Jul 22, 2016 at 10:34 PM, George Silva <[email protected]>
>> wrote:
>>
>>> Check the docs. There's plenty of information regarding this.
>>>
>>> It's probably a bad formatted character, misplaced comma or whatever.
>>>
>>> On Fri, Jul 22, 2016 at 1:49 PM, Ankush Thakur <
>>> [email protected]> wrote:
>>>
>>>> Well, setting up the line this way gives me the following error:
>>>>
>>>> Starting supervisor: Error: Format string
>>>> 'PYTHONPATH=/home/ankush/jremind/jremind,JREMIND_SECRET_KEY="SDFDSF@$%#$%$#TWFDFGFG%^$%ewrw$#%TFRETERTERT$^",JREMIND_DATABASE="jremind",JREMIND_USERNAME="root",JREMIND_PASSWORD="root"'
>>>> for 'environment' is badly formatted
>>>>
>>>> What do you think is badly formatted here?
>>>>
>>>> Best,
>>>> Ankush
>>>>
>>>>
>>>> On Thursday, July 21, 2016 at 11:51:19 PM UTC+5:30, george wrote:
>>>>>
>>>>> If you are getting variables from the environment, supervisor that
>>>>> special environment directive. The variables need to specified in the
>>>>> supervisor conf file, such as:
>>>>>
>>>>> command=/home/ankush/jremind/env/bin/celery --app=remind.celery:app
>>>>> worker --loglevel=INFO
>>>>> environment=PYTHONPATH=/home/ankush/jremind/jremind,
>>>>> *SECRET_KEY="foo",VARIABLE_A="a"*
>>>>> directory=/home/ankush/jremind/jremind
>>>>> stdout_logfile=/home/ankush/jremind/logs/celeryd.log
>>>>> stderr_logfile=/home/ankush/jremind/logs/celeryd.log
>>>>> autostart=true
>>>>> autorestart=true
>>>>> startsecs=10
>>>>> stopwaitsecs=600
>>>>>
>>>>> Supervisor won't be able to read them otherwise. There are other
>>>>> alternatives, for example, if you are using a crafted command, using bash:
>>>>>
>>>>> command=/home/foo/command.sh
>>>>> environment=PYTHONPATH=/home/ankush/jremind/jremind
>>>>> directory=/home/ankush/jremind/jremind
>>>>> stdout_logfile=/home/ankush/jremind/logs/celeryd.log
>>>>> stderr_logfile=/home/ankush/jremind/logs/celeryd.log
>>>>> autostart=true
>>>>> autorestart=true
>>>>> startsecs=10
>>>>> stopwaitsecs=600
>>>>>
>>>>>
>>>>> command.sh
>>>>>
>>>>> !#/bin/bash
>>>>>
>>>>> export SECRET_KEY="foo"
>>>>> export VARIABLE_A="a"
>>>>>
>>>>> echo $SECRET_KEY
>>>>> echo $VARIABLE_A
>>>>>
>>>>>
>>>>> --
>>>>> George R. C. Silva
>>>>> Sigma Geosistemas LTDA
>>>>> ----------------------------
>>>>> http://www.sigmageosistemas.com.br/
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at https://groups.google.com/group/django-users.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/f9639cef-0a04-4982-92b4-9c8a9c5a1158%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/f9639cef-0a04-4982-92b4-9c8a9c5a1158%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> George R. C. Silva
>>> Sigma Geosistemas LTDA
>>> ----------------------------
>>> http://www.sigmageosistemas.com.br/
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/0yxoRdSyctA/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAGyPVTv7X_9Waim0BU7uknipwPAujp5ik7AHSCBmqksRNKaszg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAGyPVTv7X_9Waim0BU7uknipwPAujp5ik7AHSCBmqksRNKaszg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CALX%3DrK%2BtutoBh3pDMLaH7Xm8MVDf%3DxXgArY7ESWrvniUgsL66w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CALX%3DrK%2BtutoBh3pDMLaH7Xm8MVDf%3DxXgArY7ESWrvniUgsL66w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> George R. C. Silva
> Sigma Geosistemas LTDA
> ----------------------------
> http://www.sigmageosistemas.com.br/
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/0yxoRdSyctA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGyPVTuXk-sG7Kd85t-87RbyYirza_zV-PCPBXJGr0cD8ZoE5g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGyPVTuXk-sG7Kd85t-87RbyYirza_zV-PCPBXJGr0cD8ZoE5g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALX%3DrKJOY9O5b1DYzMXoxb5GAka54Ms5JvbckbPEBwkPhy7BfA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to