dynflow 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +8 -8
  2. data/doc/pages/source/documentation/index.md +47 -12
  3. data/dynflow.gemspec +2 -2
  4. data/examples/future_execution.rb +73 -0
  5. data/lib/dynflow.rb +4 -1
  6. data/lib/dynflow/action.rb +15 -0
  7. data/lib/dynflow/config.rb +15 -1
  8. data/lib/dynflow/coordinator.rb +7 -0
  9. data/lib/dynflow/execution_plan.rb +15 -3
  10. data/lib/dynflow/execution_plan/steps/plan_step.rb +5 -1
  11. data/lib/dynflow/middleware.rb +4 -0
  12. data/lib/dynflow/middleware/stack.rb +1 -1
  13. data/lib/dynflow/middleware/world.rb +1 -1
  14. data/lib/dynflow/persistence.rb +19 -0
  15. data/lib/dynflow/persistence_adapters/abstract.rb +16 -0
  16. data/lib/dynflow/persistence_adapters/sequel.rb +31 -3
  17. data/lib/dynflow/persistence_adapters/sequel_migrations/006_fix_data_length.rb +17 -0
  18. data/lib/dynflow/persistence_adapters/sequel_migrations/007_future_execution.rb +13 -0
  19. data/lib/dynflow/scheduled_plan.rb +65 -0
  20. data/lib/dynflow/schedulers.rb +9 -0
  21. data/lib/dynflow/schedulers/abstract.rb +37 -0
  22. data/lib/dynflow/schedulers/abstract_core.rb +65 -0
  23. data/lib/dynflow/schedulers/polling.rb +32 -0
  24. data/lib/dynflow/serializers.rb +8 -0
  25. data/lib/dynflow/serializers/abstract.rb +15 -0
  26. data/lib/dynflow/serializers/noop.rb +15 -0
  27. data/lib/dynflow/version.rb +1 -1
  28. data/lib/dynflow/web/console.rb +8 -23
  29. data/lib/dynflow/web/console_helpers.rb +10 -0
  30. data/lib/dynflow/world.rb +99 -24
  31. data/test/abnormal_states_recovery_test.rb +64 -0
  32. data/test/future_execution_test.rb +114 -0
  33. data/test/middleware_test.rb +8 -2
  34. data/test/support/middleware_example.rb +11 -0
  35. data/test/test_helper.rb +1 -0
  36. data/web/views/show.erb +11 -0
  37. data/web/views/worlds.erb +19 -3
  38. metadata +19 -6
data/web/views/worlds.erb CHANGED
@@ -1,5 +1,10 @@
1
1
  <h1>List of worlds</h1>
2
2
 
3
+ <ul>
4
+ <li><a href="<%= url("/worlds/check") %>" class="postlink">check status</a>: see potentially invalid worlds</li>
5
+ <li><a href="<%= url("/worlds/check?invalidate=true") %>" class="postlink">check and invalidate</a>: invalidate the worlds that don't respond</li>
6
+ </ul>
7
+
3
8
  <table class="table">
4
9
  <thead>
5
10
  <tr>
@@ -16,9 +21,20 @@
16
21
  <td><%= h(world.meta) %></td>
17
22
  <td><%= "true" if world.is_a? Dynflow::Coordinator::ExecutorWorld %></td>
18
23
  <td>
19
- <a href="<%= url("/worlds/#{world.id}/ping") %>" class="postlink">ping</a>
20
- <% if world.id == params[:inactive_world_id] %>
21
- <a href="<%= url("/worlds/#{world.id}/invalidate") %>" class="postlink">invalidate</a>
24
+ <% validation_result = @validation_results[world.id] if @validation_results %>
25
+
26
+ <% unless validation_result == :invalidated %>
27
+ <a href="<%= url("/worlds/#{world.id}/check") %>" class="postlink">check</a>
28
+ <% end %>
29
+
30
+ <% if validation_result %>
31
+ <% if validation_result == :invalid %>
32
+ <a href="<%= url("/worlds/#{world.id}/check?invalidate=true") %>" class="postlink">invalidate</a>
33
+ <% end %>
34
+
35
+ <span class="label label-<%= validation_result_css_class(validation_result) %>">
36
+ <%= h(validation_result) %>
37
+ </span>
22
38
  <% end %>
23
39
  </td>
24
40
  </tr>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Necas
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-01 00:00:00.000000000 Z
12
+ date: 2015-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -73,28 +73,28 @@ dependencies:
73
73
  requirements:
74
74
  - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: 0.9.0.pre3
76
+ version: 0.9.0
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ~>
82
82
  - !ruby/object:Gem::Version
83
- version: 0.9.0.pre3
83
+ version: 0.9.0
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: concurrent-ruby-edge
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - ~>
89
89
  - !ruby/object:Gem::Version
90
- version: 0.1.0.pre3
90
+ version: 0.1.0
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - ~>
96
96
  - !ruby/object:Gem::Version
97
- version: 0.1.0.pre3
97
+ version: 0.1.0
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: rack-test
100
100
  requirement: !ruby/object:Gem::Requirement
@@ -342,6 +342,7 @@ files:
342
342
  - doc/pages/source/projects/index.md
343
343
  - dynflow.gemspec
344
344
  - examples/example_helper.rb
345
+ - examples/future_execution.rb
345
346
  - examples/orchestrate.rb
346
347
  - examples/orchestrate_evented.rb
347
348
  - examples/remote_executor.rb
@@ -423,9 +424,19 @@ files:
423
424
  - lib/dynflow/persistence_adapters/sequel_migrations/003_parent_action.rb
424
425
  - lib/dynflow/persistence_adapters/sequel_migrations/004_coordinator_records.rb
425
426
  - lib/dynflow/persistence_adapters/sequel_migrations/005_envelopes.rb
427
+ - lib/dynflow/persistence_adapters/sequel_migrations/006_fix_data_length.rb
428
+ - lib/dynflow/persistence_adapters/sequel_migrations/007_future_execution.rb
426
429
  - lib/dynflow/round_robin.rb
430
+ - lib/dynflow/scheduled_plan.rb
431
+ - lib/dynflow/schedulers.rb
432
+ - lib/dynflow/schedulers/abstract.rb
433
+ - lib/dynflow/schedulers/abstract_core.rb
434
+ - lib/dynflow/schedulers/polling.rb
427
435
  - lib/dynflow/serializable.rb
428
436
  - lib/dynflow/serializer.rb
437
+ - lib/dynflow/serializers.rb
438
+ - lib/dynflow/serializers/abstract.rb
439
+ - lib/dynflow/serializers/noop.rb
429
440
  - lib/dynflow/stateful.rb
430
441
  - lib/dynflow/testing.rb
431
442
  - lib/dynflow/testing/assertions.rb
@@ -456,6 +467,7 @@ files:
456
467
  - test/dispatcher_test.rb
457
468
  - test/execution_plan_test.rb
458
469
  - test/executor_test.rb
470
+ - test/future_execution_test.rb
459
471
  - test/middleware_test.rb
460
472
  - test/persistence_test.rb
461
473
  - test/prepare_travis_env.sh
@@ -530,6 +542,7 @@ test_files:
530
542
  - test/dispatcher_test.rb
531
543
  - test/execution_plan_test.rb
532
544
  - test/executor_test.rb
545
+ - test/future_execution_test.rb
533
546
  - test/middleware_test.rb
534
547
  - test/persistence_test.rb
535
548
  - test/prepare_travis_env.sh