/srv/irclogs.ubuntu.com/2012/08/12/#upstart.txt

RoboTeddyis there a way to restart all the services started by a task such as http://upstart.ubuntu.com/cookbook/#instance ?01:12
SpamapSRoboTeddy: initctl list is very easy to parse, so thats the way to accomplish that.03:56
RoboTeddySpamapS: ok, cool, thanks. here's the actual solution I came up with; I'm not sure if it's problematic: https://gist.github.com/bb349098a1b4f6fb577a04:07
RoboTeddyinstead of using making a task that runs multiple service instances, it's a service that starts multiple services, which are in turn set to shut down when the parent service stops04:08
RoboTeddyI'm not sure if it's a gross misuse of upstart or not04:09
SpamapSRoboTeddy: I'm a bit confused why you don't just run the workers as children in the background of python-application using &04:10
RoboTeddySpamapS: but then if a child crashed, it wouldn't automatically respawn04:11
SpamapStrue04:11
SpamapSits actually pretty elegant04:11
RoboTeddyit's a similar setup to http://upstart.ubuntu.com/cookbook/#instance , except the parent is a service rather than a task04:11
SpamapSit makes more sense as a service really04:12
RoboTeddycoool, thanks for the feedback04:12
SpamapSRoboTeddy: btw, sleep 100000000 works better.. ;)04:12
SpamapSno need for the while04:12
RoboTeddySpamapS: hehe true ;) I had 04:12
RoboTeddy* I had 'sleep 1', but then realized I'd be hitting the cpu a tad04:12
RoboTeddyyeah true, 100000000 seconds is 3 years04:13
SpamapSRoboTeddy: yeah sleep is a free thing so just do sleep 100000 :)04:14
SpamapSRoboTeddy: in fact you can 'exec sleep 10000000' and save a process :)04:14
RoboTeddySpamapS: cool, thanks04:14
SpamapSI'd go for 2**3104:14
SpamapS68 years, and very likely to work :)04:15
RoboTeddy:) gtg, thanks for the advice04:15
* SpamapS just now realized he will turn 60 when "y2k38" hits04:16

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!