Which functions are invoked in swift source code?

asked 2013-10-05 00:02:35 -0500

pragya jain gravatar image

updated 2013-10-06 16:15:10 -0500

nerminamiller gravatar image

Hello,

I am studying swift source code.

My problem is:

When we start swift, and start swift account processes by giving the command: $ sudo swift-init accoount-reaper start $ sudo swift-init accoount-auditor start $ sudo swift-init accoount-replicator start

which functions are invoked in swift sourcecode? Are they the __init__ functions defined in the class AccountReaper in swift/account/reaper.py, class AccountAuditor in swift/account/auditor.py and class AccountReplicator in swift/account/replicator.py respectively

Please help me in this regard.

edit retag flag offensive close merge delete

Comments

Thanks notmyname for the help. Now I understand that 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?

pragya jain gravatar imagepragya jain ( 2013-10-07 23:34:09 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-06 22:25:37 -0500

notmyname gravatar image

Swift uses standard Python WSGI semantics for the control flow. You can read more about WSGI at http://wsgi.readthedocs.org/en/latest/ . For a high-level overview of understanding of how Swift specifically is put together, check out http://swiftstack.com/blog/2013/02/12/swift-for-new-contributors/

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-10-05 00:02:35 -0500

Seen: 109 times

Last updated: Oct 06 '13