forked from benoitc/pistil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix the arbiter. Make sure it notify the master when he's up.
- Loading branch information
benoitc
committed
Aug 8, 2011
1 parent
1efa782
commit 6c53324
Showing
4 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 - | ||
# | ||
# This file is part of pistil released under the MIT license. | ||
# See the NOTICE for more information. | ||
|
||
from pistil.pool import PoolArbiter | ||
from pistil.worker import Worker | ||
|
||
class MyWorker(Worker): | ||
|
||
def handle(self): | ||
print "hello from worker n°%s" % self.pid | ||
|
||
if __name__ == "__main__": | ||
conf = {"num_workers": 3 } | ||
spec = (MyWorker, 30, "worker", {}, "test",) | ||
a = PoolArbiter(conf, spec) | ||
a.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters