fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Help running a background Task: celery daemon


From: Amit Saha
Subject: Re: [Fab-user] Help running a background Task: celery daemon
Date: Wed, 13 Jun 2012 01:50:47 +1000

On Tue, Jun 12, 2012 at 10:50 PM, Todd DeLuca <address@hidden> wrote:
> A few things to try if you haven't already:
>
> Use fabric.api.sudo() instead of run().
>
> Make sure the command works, exactly as written, including the sudo, from
> the command line.  Sudo does weird things to $PATH.  For some details, see
> http://forums.opensuse.org/english/get-technical-help-here/applications/464347-help-me-understand-sudo-path-weirdness-2.html.
>  Here is an example:
>
> $ echo $PATH
> /home/ec2-user/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin
> $ sudo echo $PATH # Wrong!  PATH is expanded by the shell before running
> sudo
> /home/ec2-user/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin
> $ sudo bash -c 'echo $PATH'
> /sbin:/bin:/usr/sbin:/usr/bin

Thanks for the tips, Todd. Like I replied earlier, I tried 'zdaemon'
and it worked for my purpose. I shall keep the sudo( ) in mind.

Best,
Amit
>
> Cheers,
> Todd
>
> On Tue, Jun 12, 2012 at 12:55 AM, Amit Saha <address@hidden>
> wrote:
>>
>> Hello:
>>
>> I want to run 'celeryd' (celery daemon) as a background process on a
>> remote machine. I have tried to follow the FAQ and also the issue
>> tracker comments [1] and tried this using:
>>
>> run('cd {0:s};nohup sudo celeryd --loglevel=INFO --logfile={1:s} >&
>> "/dev/null" < "/dev/null" &'.format(worker_workdir,log),pty=False)
>>
>> Is this correct? It doesn't seem to be working.
>>
>> Thanks in advance.
>>
>> Best,
>> -Amit
>>
>> --
>> http://echorand.me
>>
>> _______________________________________________
>> Fab-user mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/fab-user
>
>
>
>
> --
> Todd DeLuca
> http://todddeluca.com
> http://wall.hms.harvard.edu/
>
>



-- 
http://echorand.me



reply via email to

[Prev in Thread] Current Thread [Next in Thread]