lib/rudy/routines/passthrough.rb in solutious-rudy-0.9.3 vs lib/rudy/routines/passthrough.rb in solutious-rudy-0.9.4
- old
+ new
@@ -1,17 +1,24 @@
module Rudy; module Routines;
class Passthrough < Rudy::Routines::Base
def init(*args)
- @machines = Rudy::Machines.list || []
- @@rset = Rudy::Routines::Handlers::RyeTools.create_set @machines
+ Rudy::Routines.rescue {
+ @machines = Rudy::Machines.list || []
+ @@rset = Rudy::Routines::Handlers::RyeTools.create_set @machines
+ }
end
def execute
- li "Executing routine: #{@name}"
- return @machines unless run?
Rudy::Routines::Handlers::Depends.execute_all @before
+ li " Executing routine: #{@name} ".att(:reverse)
+ # Re-retreive the machine set to reflect dependency changes
+ Rudy::Routines.rescue {
+ @machines = Rudy::Machines.list || []
+ @@rset = Rudy::Routines::Handlers::RyeTools.create_set @machines
+ }
+ return @machines unless run?
Rudy::Routines.runner(@routine, @@rset, @@lbox, @argv)
Rudy::Routines::Handlers::Depends.execute_all @after
@machines
end
\ No newline at end of file