swift-init looks for a "--once" argument. If it's present, then the once kwarg 
will be set in the call to swift.common.daemon.run_daemon(). This in turn calls 
the appropriate run_once or run_forever.

https://github.com/openstack/swift/blob/master/swift/common/daemon.py#L55


--John


On Oct 7, 2013, at 9:36 PM, pragya jain <prag_2...@yahoo.co.in> wrote:

> hello all,
> 
> when we give the command 
> $ sudo swift-init accoount-auditor start
> 
>  __init__ functions defined in the class AccountAuditor in 
> swift/account/auditor.py is invoked.
>   
> But, I don't understand
> 1. How does the control go to run_forever() or run_once() function defined in 
> the same class?
> 2. Who will decide whether to run run_forever() function or run_once() 
> function?
> 
> Please help me in this regard
> ------
> 
> Thanks 
> 
> Pragya jain
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack@lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to