rfdonnelly / jobrnr

Jobrnr runs jobs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add iterations to GraphViz dot output

rfdonnelly opened this issue · comments

Before

before

After

after

Patch

diff --git a/lib/jobrnr/graph.rb b/lib/jobrnr/graph.rb
index 7bf9f83..afb9da8 100644
--- a/lib/jobrnr/graph.rb
+++ b/lib/jobrnr/graph.rb
@@ -42,6 +42,8 @@ module Jobrnr
             lines << "#{j.id} -> #{s.id}"
           end
         end
+
+        lines << '%s -> %s [ label = "%d" ]' % [j.id, j.id, j.iterations] if j.iterations > 1
       end

       [