Add iterations to GraphViz dot output
rfdonnelly opened this issue · comments
Before
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
[