job-workflow 0.5.0 → 0.6.1
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.
- checksums.yaml +4 -4
- data/.agents/instructions/coding-style.md +38 -0
- data/.agents/instructions/domain.md +37 -0
- data/.agents/instructions/environment.md +44 -0
- data/.agents/instructions/general.md +29 -0
- data/.agents/instructions/security.md +20 -0
- data/.agents/instructions/structure.md +43 -0
- data/.agents/instructions/tech-stack.md +40 -0
- data/.agents/instructions/testing.md +46 -0
- data/.agents/instructions/workflow.md +39 -0
- data/.rubocop.yml +1 -2
- data/AGENTS.md +23 -0
- data/CHANGELOG.md +26 -0
- data/README.md +1 -1
- data/app/controllers/job_workflow/monitoring/application_controller.rb +11 -0
- data/app/controllers/job_workflow/monitoring/executions_controller.rb +28 -0
- data/app/controllers/job_workflow/monitoring/workflows_controller.rb +11 -0
- data/app/views/job_workflow/monitoring/executions/index.html.erb +57 -0
- data/app/views/job_workflow/monitoring/executions/show.html.erb +200 -0
- data/app/views/job_workflow/monitoring/workflows/index.html.erb +39 -0
- data/app/views/layouts/job_workflow/monitoring/application.html.erb +117 -0
- data/config/routes.rb +8 -0
- data/guides/API_REFERENCE.md +9 -6
- data/guides/DEPENDENCY_WAIT.md +9 -5
- data/guides/MONITORING_UI.md +74 -0
- data/guides/PARALLEL_PROCESSING.md +33 -21
- data/guides/PRODUCTION_DEPLOYMENT.md +1 -1
- data/guides/README.md +6 -1
- data/guides/THROTTLING.md +24 -0
- data/guides/WORKFLOW_STATUS_QUERY.md +7 -1
- data/lib/job_workflow/context.rb +7 -5
- data/lib/job_workflow/dsl.rb +0 -4
- data/lib/job_workflow/instrumentation/opentelemetry_subscriber.rb +1 -1
- data/lib/job_workflow/instrumentation.rb +14 -14
- data/lib/job_workflow/job_status.rb +16 -1
- data/lib/job_workflow/monitoring/dag_layout.rb +186 -0
- data/lib/job_workflow/monitoring/engine.rb +15 -0
- data/lib/job_workflow/monitoring/execution_page.rb +16 -0
- data/lib/job_workflow/monitoring/execution_registry.rb +50 -0
- data/lib/job_workflow/monitoring/execution_view_model.rb +258 -0
- data/lib/job_workflow/monitoring/parameter_filter.rb +37 -0
- data/lib/job_workflow/monitoring/workflow_definition.rb +24 -0
- data/lib/job_workflow/monitoring/workflow_registry.rb +24 -0
- data/lib/job_workflow/monitoring.rb +120 -0
- data/lib/job_workflow/queue_adapters/abstract.rb +7 -2
- data/lib/job_workflow/queue_adapters/null_adapter.rb +12 -1
- data/lib/job_workflow/queue_adapters/solid_queue_adapter.rb +42 -12
- data/lib/job_workflow/railtie.rb +2 -0
- data/lib/job_workflow/runner.rb +5 -3
- data/lib/job_workflow/sub_task_job.rb +93 -0
- data/lib/job_workflow/task_enqueue.rb +19 -12
- data/lib/job_workflow/version.rb +1 -1
- data/lib/job_workflow/workflow_status.rb +39 -3
- data/lib/job_workflow.rb +2 -0
- data/rbs_collection.lock.yaml +11 -11
- data/sig/generated/job_workflow/context.rbs +7 -7
- data/sig/generated/job_workflow/instrumentation/opentelemetry_subscriber.rbs +0 -1
- data/sig/generated/job_workflow/instrumentation.rbs +28 -28
- data/sig/generated/job_workflow/job_status.rbs +5 -2
- data/sig/generated/job_workflow/monitoring/dag_layout.rbs +80 -0
- data/sig/generated/job_workflow/monitoring/engine.rbs +8 -0
- data/sig/generated/job_workflow/monitoring/execution_page.rbs +14 -0
- data/sig/generated/job_workflow/monitoring/execution_registry.rbs +21 -0
- data/sig/generated/job_workflow/monitoring/execution_view_model.rbs +111 -0
- data/sig/generated/job_workflow/monitoring/parameter_filter.rbs +16 -0
- data/sig/generated/job_workflow/monitoring/workflow_definition.rbs +18 -0
- data/sig/generated/job_workflow/monitoring/workflow_registry.rbs +13 -0
- data/sig/generated/job_workflow/monitoring.rbs +38 -0
- data/sig/generated/job_workflow/queue_adapters/abstract.rbs +7 -4
- data/sig/generated/job_workflow/queue_adapters/null_adapter.rbs +5 -2
- data/sig/generated/job_workflow/queue_adapters/solid_queue_adapter.rbs +18 -6
- data/sig/generated/job_workflow/runner.rbs +1 -1
- data/sig/generated/job_workflow/sub_task_job.rbs +40 -0
- data/sig/generated/job_workflow/task_enqueue.rbs +5 -8
- data/sig/generated/job_workflow/workflow_status.rbs +18 -2
- data/sig-private/job-workflow.rbs +11 -0
- data/sig-private/rails.rbs +5 -0
- metadata +42 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Generated from lib/job_workflow/monitoring/execution_view_model.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module JobWorkflow
|
|
4
|
+
module Monitoring
|
|
5
|
+
class ExecutionViewModel
|
|
6
|
+
attr_reader job_id: String
|
|
7
|
+
|
|
8
|
+
attr_reader queue_name: String?
|
|
9
|
+
|
|
10
|
+
attr_reader status: WorkflowStatus
|
|
11
|
+
|
|
12
|
+
# : (job_id: String, queue_name: String?, status: WorkflowStatus) -> void
|
|
13
|
+
def initialize: (job_id: String, queue_name: String?, status: WorkflowStatus) -> void
|
|
14
|
+
|
|
15
|
+
# : () -> String
|
|
16
|
+
def job_class_name: () -> String
|
|
17
|
+
|
|
18
|
+
# : () -> Symbol
|
|
19
|
+
def workflow_status: () -> Symbol
|
|
20
|
+
|
|
21
|
+
# : () -> Symbol?
|
|
22
|
+
def current_task_name: () -> Symbol?
|
|
23
|
+
|
|
24
|
+
# : () -> Arguments
|
|
25
|
+
def arguments: () -> Arguments
|
|
26
|
+
|
|
27
|
+
# : () -> Hash[untyped, untyped]
|
|
28
|
+
def filtered_arguments: () -> Hash[untyped, untyped]
|
|
29
|
+
|
|
30
|
+
# : () -> Array[Hash[Symbol, untyped]]
|
|
31
|
+
def tasks: () -> Array[Hash[Symbol, untyped]]
|
|
32
|
+
|
|
33
|
+
# : () -> Symbol?
|
|
34
|
+
def failed_task_name: () -> Symbol?
|
|
35
|
+
|
|
36
|
+
# : () -> String?
|
|
37
|
+
def mission_control_job_path: () -> String?
|
|
38
|
+
|
|
39
|
+
# : () -> Hash[Symbol, untyped]
|
|
40
|
+
def dag_layout: () -> Hash[Symbol, untyped]
|
|
41
|
+
|
|
42
|
+
# : () -> bool
|
|
43
|
+
def running?: () -> bool
|
|
44
|
+
|
|
45
|
+
# : () -> Hash[Symbol, untyped]
|
|
46
|
+
def to_h: () -> Hash[Symbol, untyped]
|
|
47
|
+
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
# : (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> Symbol
|
|
51
|
+
def task_status: (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> Symbol
|
|
52
|
+
|
|
53
|
+
# : (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> bool
|
|
54
|
+
def completed_task?: (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> bool
|
|
55
|
+
|
|
56
|
+
# : (Symbol, Array[TaskJobStatus]) -> bool
|
|
57
|
+
def task_running?: (Symbol, Array[TaskJobStatus]) -> bool
|
|
58
|
+
|
|
59
|
+
# : (Symbol) -> bool
|
|
60
|
+
def current_task_running?: (Symbol) -> bool
|
|
61
|
+
|
|
62
|
+
# : (Task) -> Hash[Symbol, untyped]
|
|
63
|
+
def task_view_model: (Task) -> Hash[Symbol, untyped]
|
|
64
|
+
|
|
65
|
+
# : (Task) -> Hash[Symbol, untyped]
|
|
66
|
+
def task_configuration_view: (Task) -> Hash[Symbol, untyped]
|
|
67
|
+
|
|
68
|
+
# : (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> Hash[Symbol, untyped]
|
|
69
|
+
def task_runtime_view: (Symbol, Array[TaskOutput], Array[TaskJobStatus]) -> Hash[Symbol, untyped]
|
|
70
|
+
|
|
71
|
+
# : (Symbol) -> [Array[TaskOutput], Array[TaskJobStatus]]
|
|
72
|
+
def task_state: (Symbol) -> [ Array[TaskOutput], Array[TaskJobStatus] ]
|
|
73
|
+
|
|
74
|
+
# : (Task) -> Hash[Symbol, untyped]
|
|
75
|
+
def task_configuration: (Task) -> Hash[Symbol, untyped]
|
|
76
|
+
|
|
77
|
+
# : (Task) -> Hash[Symbol, untyped]
|
|
78
|
+
def enqueue_configuration: (Task) -> Hash[Symbol, untyped]
|
|
79
|
+
|
|
80
|
+
# : (Task) -> Array[Hash[Symbol, untyped]]
|
|
81
|
+
def output_configuration: (Task) -> Array[Hash[Symbol, untyped]]
|
|
82
|
+
|
|
83
|
+
# : (Task) -> Hash[Symbol, untyped]
|
|
84
|
+
def retry_configuration: (Task) -> Hash[Symbol, untyped]
|
|
85
|
+
|
|
86
|
+
# : (Task) -> Hash[Symbol, untyped]
|
|
87
|
+
def throttle_configuration: (Task) -> Hash[Symbol, untyped]
|
|
88
|
+
|
|
89
|
+
# : (Task) -> Hash[Symbol, untyped]
|
|
90
|
+
def dependency_wait_configuration: (Task) -> Hash[Symbol, untyped]
|
|
91
|
+
|
|
92
|
+
# : (untyped) -> untyped
|
|
93
|
+
def callable_summary: (untyped) -> untyped
|
|
94
|
+
|
|
95
|
+
# : (untyped) -> untyped
|
|
96
|
+
def primitive_summary: (untyped) -> untyped
|
|
97
|
+
|
|
98
|
+
# : (Array[TaskOutput], Array[TaskJobStatus]) -> Hash[Symbol, Integer]
|
|
99
|
+
def each_progress: (Array[TaskOutput], Array[TaskJobStatus]) -> Hash[Symbol, Integer]
|
|
100
|
+
|
|
101
|
+
# : (Array[TaskOutput]) -> Array[Hash[Symbol, untyped]]
|
|
102
|
+
def task_outputs_view: (Array[TaskOutput]) -> Array[Hash[Symbol, untyped]]
|
|
103
|
+
|
|
104
|
+
# : (Array[TaskJobStatus]) -> Array[Hash[Symbol, untyped]]
|
|
105
|
+
def sub_task_jobs_view: (Array[TaskJobStatus]) -> Array[Hash[Symbol, untyped]]
|
|
106
|
+
|
|
107
|
+
# : (String?, Symbol?) -> String?
|
|
108
|
+
def mission_control_job_path_for: (String?, Symbol?) -> String?
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Generated from lib/job_workflow/monitoring/parameter_filter.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module JobWorkflow
|
|
4
|
+
module Monitoring
|
|
5
|
+
class ParameterFilter
|
|
6
|
+
# : (untyped) -> untyped
|
|
7
|
+
def self.filter: (untyped) -> untyped
|
|
8
|
+
|
|
9
|
+
# : () -> ActiveSupport::ParameterFilter
|
|
10
|
+
private def self.parameter_filter: () -> ActiveSupport::ParameterFilter
|
|
11
|
+
|
|
12
|
+
# : () -> Array[untyped]
|
|
13
|
+
private def self.filters: () -> Array[untyped]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Generated from lib/job_workflow/monitoring/workflow_definition.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module JobWorkflow
|
|
4
|
+
module Monitoring
|
|
5
|
+
class WorkflowDefinition
|
|
6
|
+
attr_reader job_class: singleton(DSL)
|
|
7
|
+
|
|
8
|
+
# : (job_class: singleton(DSL)) -> void
|
|
9
|
+
def initialize: (job_class: singleton(DSL)) -> void
|
|
10
|
+
|
|
11
|
+
# : () -> String
|
|
12
|
+
def job_class_name: () -> String
|
|
13
|
+
|
|
14
|
+
# : () -> Integer
|
|
15
|
+
def task_count: () -> Integer
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Generated from lib/job_workflow/monitoring/workflow_registry.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module JobWorkflow
|
|
4
|
+
module Monitoring
|
|
5
|
+
class WorkflowRegistry
|
|
6
|
+
# : () -> Array[singleton(DSL)]
|
|
7
|
+
def self.all: () -> Array[singleton(DSL)]
|
|
8
|
+
|
|
9
|
+
# : (String) -> singleton(DSL)?
|
|
10
|
+
def self.find: (String) -> singleton(DSL)?
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Generated from lib/job_workflow/monitoring.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module JobWorkflow
|
|
4
|
+
module Monitoring
|
|
5
|
+
# : () -> Array[WorkflowDefinition]
|
|
6
|
+
def self.workflows: () -> Array[WorkflowDefinition]
|
|
7
|
+
|
|
8
|
+
# : (String?, Symbol?) -> String?
|
|
9
|
+
def self.mission_control_job_path: (String?, Symbol?) -> String?
|
|
10
|
+
|
|
11
|
+
# : () -> String
|
|
12
|
+
def self.resolved_base_controller_class: () -> String
|
|
13
|
+
|
|
14
|
+
# : (untyped config) -> void
|
|
15
|
+
def self.configure_engine_config: (untyped config) -> void
|
|
16
|
+
|
|
17
|
+
# : () -> String?
|
|
18
|
+
private def self.mission_control_job_route_path: () -> String?
|
|
19
|
+
|
|
20
|
+
# : () -> String?
|
|
21
|
+
private def self.mission_control_application_id: () -> String?
|
|
22
|
+
|
|
23
|
+
# : () -> String?
|
|
24
|
+
private def self.mission_control_mount_path: () -> String?
|
|
25
|
+
|
|
26
|
+
# : (String) -> String?
|
|
27
|
+
private def self.engine_route_path: (String) -> String?
|
|
28
|
+
|
|
29
|
+
# : (untyped) -> String?
|
|
30
|
+
private def self.normalized_route_path: (untyped) -> String?
|
|
31
|
+
|
|
32
|
+
# : () -> untyped
|
|
33
|
+
private def self.mission_control_routes: () -> untyped
|
|
34
|
+
|
|
35
|
+
# : () -> untyped
|
|
36
|
+
private def self.rails_routes: () -> untyped
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -49,14 +49,17 @@ module JobWorkflow
|
|
|
49
49
|
# : (String) -> Hash[String, untyped]?
|
|
50
50
|
def find_job: (String) -> Hash[String, untyped]?
|
|
51
51
|
|
|
52
|
+
# : (job_class_name: String, limit: Integer, cursor: String?) -> Hash[Symbol, untyped]
|
|
53
|
+
def fetch_root_workflow_job_page: (job_class_name: String, limit: Integer, cursor: String?) -> Hash[Symbol, untyped]
|
|
54
|
+
|
|
52
55
|
# : (Array[String]) -> Array[Hash[String, untyped]]
|
|
53
56
|
def fetch_job_contexts: (Array[String]) -> Array[Hash[String, untyped]]
|
|
54
57
|
|
|
55
|
-
# : (
|
|
56
|
-
def reschedule_job: (
|
|
58
|
+
# : (_JobInterface, Numeric) -> bool
|
|
59
|
+
def reschedule_job: (_JobInterface, Numeric) -> bool
|
|
57
60
|
|
|
58
|
-
# : (
|
|
59
|
-
def persist_job_context: (
|
|
61
|
+
# : (_JobInterface) -> void
|
|
62
|
+
def persist_job_context: (_JobInterface) -> void
|
|
60
63
|
end
|
|
61
64
|
end
|
|
62
65
|
end
|
|
@@ -51,11 +51,14 @@ module JobWorkflow
|
|
|
51
51
|
# : (String) -> Hash[String, untyped]?
|
|
52
52
|
def find_job: (String) -> Hash[String, untyped]?
|
|
53
53
|
|
|
54
|
+
# : (job_class_name: String, limit: Integer, cursor: String?) -> Hash[Symbol, untyped]
|
|
55
|
+
def fetch_root_workflow_job_page: (job_class_name: String, limit: Integer, cursor: String?) -> Hash[Symbol, untyped]
|
|
56
|
+
|
|
54
57
|
# : (Array[String]) -> Array[Hash[String, untyped]]
|
|
55
58
|
def fetch_job_contexts: (Array[String]) -> Array[Hash[String, untyped]]
|
|
56
59
|
|
|
57
|
-
# : (
|
|
58
|
-
def reschedule_job: (
|
|
60
|
+
# : (_JobInterface, Numeric) -> bool
|
|
61
|
+
def reschedule_job: (_JobInterface, Numeric) -> bool
|
|
59
62
|
|
|
60
63
|
# @note Test helpers
|
|
61
64
|
#
|
|
@@ -82,14 +82,17 @@ module JobWorkflow
|
|
|
82
82
|
# : (String) -> Hash[String, untyped]?
|
|
83
83
|
def find_job: (String) -> Hash[String, untyped]?
|
|
84
84
|
|
|
85
|
+
# : (job_class_name: String, limit: Integer, cursor: String?) -> Hash[Symbol, untyped]
|
|
86
|
+
def fetch_root_workflow_job_page: (job_class_name: String, limit: Integer, cursor: String?) -> Hash[Symbol, untyped]
|
|
87
|
+
|
|
85
88
|
# @note
|
|
86
89
|
# - Fetches job_workflow_context hashes for the given job IDs.
|
|
87
90
|
#
|
|
88
91
|
# : (Array[String]) -> Array[Hash[String, untyped]]
|
|
89
92
|
def fetch_job_contexts: (Array[String]) -> Array[Hash[String, untyped]]
|
|
90
93
|
|
|
91
|
-
# : (
|
|
92
|
-
def reschedule_job: (
|
|
94
|
+
# : (_JobInterface, Numeric) -> bool
|
|
95
|
+
def reschedule_job: (_JobInterface, Numeric) -> bool
|
|
93
96
|
|
|
94
97
|
# @note
|
|
95
98
|
# - Persists the job's updated context (including task outputs) back
|
|
@@ -97,8 +100,8 @@ module JobWorkflow
|
|
|
97
100
|
# outputs computed during job execution would be lost because
|
|
98
101
|
# SolidQueue does not re-serialize job arguments after perform.
|
|
99
102
|
#
|
|
100
|
-
# : (
|
|
101
|
-
def persist_job_context: (
|
|
103
|
+
# : (_JobInterface) -> void
|
|
104
|
+
def persist_job_context: (_JobInterface) -> void
|
|
102
105
|
|
|
103
106
|
private
|
|
104
107
|
|
|
@@ -113,8 +116,17 @@ module JobWorkflow
|
|
|
113
116
|
# : [T] () { () -> T } -> T
|
|
114
117
|
def without_query_cache: [T] () { () -> T } -> T
|
|
115
118
|
|
|
116
|
-
# : (SolidQueue::Job
|
|
117
|
-
def
|
|
119
|
+
# : (SolidQueue::Job) -> Hash[String, untyped]
|
|
120
|
+
def normalized_job_data: (SolidQueue::Job) -> Hash[String, untyped]
|
|
121
|
+
|
|
122
|
+
# : (job_class_name: String, cursor: String?) -> untyped
|
|
123
|
+
def root_jobs_relation: (job_class_name: String, cursor: String?) -> untyped
|
|
124
|
+
|
|
125
|
+
# : (Array[SolidQueue::Job], limit: Integer) -> Hash[Symbol, untyped]
|
|
126
|
+
def build_page: (Array[SolidQueue::Job], limit: Integer) -> Hash[Symbol, untyped]
|
|
127
|
+
|
|
128
|
+
# : (SolidQueue::Job, _JobInterface, Numeric) -> bool
|
|
129
|
+
def reschedule_solid_queue_job: (SolidQueue::Job, _JobInterface, Numeric) -> bool
|
|
118
130
|
|
|
119
131
|
# @rbs module-self SolidQueue::ClaimedExecution
|
|
120
132
|
module ClaimedExecutionPatch : SolidQueue::ClaimedExecution
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Generated from lib/job_workflow/sub_task_job.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module JobWorkflow
|
|
4
|
+
class SubTaskJob < ActiveJob::Base
|
|
5
|
+
include ActiveJob::Continuable
|
|
6
|
+
|
|
7
|
+
# : (context: Context) -> SubTaskJob
|
|
8
|
+
def self.from_parent_context: (context: Context) -> SubTaskJob
|
|
9
|
+
|
|
10
|
+
# : (Context) -> void
|
|
11
|
+
private def self.validate_sub_task_context!: (Context) -> void
|
|
12
|
+
|
|
13
|
+
# : (Hash[untyped, untyped]) -> void
|
|
14
|
+
def perform: (Hash[untyped, untyped]) -> void
|
|
15
|
+
|
|
16
|
+
# : () -> Output
|
|
17
|
+
def output: () -> Output
|
|
18
|
+
|
|
19
|
+
attr_accessor _context: Context?
|
|
20
|
+
|
|
21
|
+
# : () -> Hash[String, untyped]
|
|
22
|
+
def serialize: () -> Hash[String, untyped]
|
|
23
|
+
|
|
24
|
+
# : (Hash[String, untyped]) -> void
|
|
25
|
+
def deserialize: (Hash[String, untyped]) -> void
|
|
26
|
+
|
|
27
|
+
private
|
|
28
|
+
|
|
29
|
+
attr_accessor serialized_job_workflow_context: Hash[String, untyped]?
|
|
30
|
+
|
|
31
|
+
# : (Hash[Symbol, untyped]) -> Context
|
|
32
|
+
def build_context: (Hash[Symbol, untyped]) -> Context
|
|
33
|
+
|
|
34
|
+
# : (job_class_name: String) -> Workflow
|
|
35
|
+
def resolve_workflow: (job_class_name: String) -> Workflow
|
|
36
|
+
|
|
37
|
+
# : (Hash[Symbol, untyped]) -> Hash[String, untyped]
|
|
38
|
+
def extract_context_data: (Hash[Symbol, untyped]) -> Hash[String, untyped]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -6,22 +6,19 @@ module JobWorkflow
|
|
|
6
6
|
|
|
7
7
|
attr_reader queue: String?
|
|
8
8
|
|
|
9
|
-
attr_reader concurrency: Integer?
|
|
10
|
-
|
|
11
9
|
# : (true | false | ^(Context) -> bool | Hash[Symbol, untyped] | nil) -> TaskEnqueue
|
|
12
10
|
def self.from_primitive_value: (true | false | ^(Context) -> bool | Hash[Symbol, untyped] | nil) -> TaskEnqueue
|
|
13
11
|
|
|
12
|
+
# : (Hash[Symbol, untyped]) -> void
|
|
13
|
+
private def self.validate_hash_keys!: (Hash[Symbol, untyped]) -> void
|
|
14
|
+
|
|
14
15
|
# : (
|
|
15
16
|
# ?condition: true | false | ^(Context) -> bool,
|
|
16
|
-
# ?queue: String
|
|
17
|
-
# ?concurrency: Integer?
|
|
17
|
+
# ?queue: String?
|
|
18
18
|
# ) -> void
|
|
19
|
-
def initialize: (?condition: true | false | ^(Context) -> bool, ?queue: String
|
|
19
|
+
def initialize: (?condition: true | false | ^(Context) -> bool, ?queue: String?) -> void
|
|
20
20
|
|
|
21
21
|
# : (Context) -> bool
|
|
22
22
|
def should_enqueue?: (Context) -> bool
|
|
23
|
-
|
|
24
|
-
# : () -> bool
|
|
25
|
-
def should_limits_concurrency?: () -> bool
|
|
26
23
|
end
|
|
27
24
|
end
|
|
@@ -13,6 +13,8 @@ module JobWorkflow
|
|
|
13
13
|
|
|
14
14
|
attr_reader status: status_type
|
|
15
15
|
|
|
16
|
+
attr_reader completed_task_names: Array[Symbol]
|
|
17
|
+
|
|
16
18
|
# : (String) -> WorkflowStatus
|
|
17
19
|
def self.find: (String) -> WorkflowStatus
|
|
18
20
|
|
|
@@ -22,8 +24,22 @@ module JobWorkflow
|
|
|
22
24
|
# : (Hash[String, untyped]) -> WorkflowStatus
|
|
23
25
|
def self.from_job_data: (Hash[String, untyped]) -> WorkflowStatus
|
|
24
26
|
|
|
25
|
-
# : (
|
|
26
|
-
def
|
|
27
|
+
# : (Hash[String, untyped]) -> Array[Symbol]
|
|
28
|
+
private def self.completed_task_names_from_job_data: (Hash[String, untyped]) -> Array[Symbol]
|
|
29
|
+
|
|
30
|
+
# : (Hash[String, untyped], Workflow) -> Context
|
|
31
|
+
private def self.context_from_job_data: (Hash[String, untyped], Workflow) -> Context
|
|
32
|
+
|
|
33
|
+
# : (Hash[String, untyped]) -> Hash[String, untyped]?
|
|
34
|
+
private def self.workflow_arguments_data: (Hash[String, untyped]) -> Hash[String, untyped]?
|
|
35
|
+
|
|
36
|
+
# : (
|
|
37
|
+
# context: Context,
|
|
38
|
+
# job_class_name: String,
|
|
39
|
+
# status: status_type,
|
|
40
|
+
# ?completed_task_names: Array[Symbol]
|
|
41
|
+
# ) -> void
|
|
42
|
+
def initialize: (context: Context, job_class_name: String, status: status_type, ?completed_task_names: Array[Symbol]) -> void
|
|
27
43
|
|
|
28
44
|
# : () -> Symbol?
|
|
29
45
|
def current_task_name: () -> Symbol?
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module JobWorkflow
|
|
2
|
+
interface _JobInterface
|
|
3
|
+
def job_id: () -> String
|
|
4
|
+
def queue_name: () -> String
|
|
5
|
+
def serialize: () -> Hash[String, untyped]
|
|
6
|
+
def _context: () -> JobWorkflow::Context?
|
|
7
|
+
def _context=: (JobWorkflow::Context) -> JobWorkflow::Context
|
|
8
|
+
def step: (Symbol, ?start: ActiveJob::Continuation::_Succ, ?isolated: bool) -> void
|
|
9
|
+
| (Symbol, ?start: ActiveJob::Continuation::_Succ, ?isolated: bool) { (ActiveJob::Continuation::Step) -> void } -> void
|
|
10
|
+
end
|
|
11
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: job-workflow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- shoma07
|
|
@@ -31,13 +31,31 @@ executables: []
|
|
|
31
31
|
extensions: []
|
|
32
32
|
extra_rdoc_files: []
|
|
33
33
|
files:
|
|
34
|
+
- ".agents/instructions/coding-style.md"
|
|
35
|
+
- ".agents/instructions/domain.md"
|
|
36
|
+
- ".agents/instructions/environment.md"
|
|
37
|
+
- ".agents/instructions/general.md"
|
|
38
|
+
- ".agents/instructions/security.md"
|
|
39
|
+
- ".agents/instructions/structure.md"
|
|
40
|
+
- ".agents/instructions/tech-stack.md"
|
|
41
|
+
- ".agents/instructions/testing.md"
|
|
42
|
+
- ".agents/instructions/workflow.md"
|
|
34
43
|
- ".rspec"
|
|
35
44
|
- ".rubocop.yml"
|
|
45
|
+
- AGENTS.md
|
|
36
46
|
- CHANGELOG.md
|
|
37
47
|
- LICENSE.txt
|
|
38
48
|
- README.md
|
|
39
49
|
- Rakefile
|
|
40
50
|
- Steepfile
|
|
51
|
+
- app/controllers/job_workflow/monitoring/application_controller.rb
|
|
52
|
+
- app/controllers/job_workflow/monitoring/executions_controller.rb
|
|
53
|
+
- app/controllers/job_workflow/monitoring/workflows_controller.rb
|
|
54
|
+
- app/views/job_workflow/monitoring/executions/index.html.erb
|
|
55
|
+
- app/views/job_workflow/monitoring/executions/show.html.erb
|
|
56
|
+
- app/views/job_workflow/monitoring/workflows/index.html.erb
|
|
57
|
+
- app/views/layouts/job_workflow/monitoring/application.html.erb
|
|
58
|
+
- config/routes.rb
|
|
41
59
|
- guides/API_REFERENCE.md
|
|
42
60
|
- guides/BEST_PRACTICES.md
|
|
43
61
|
- guides/CACHE_STORE_INTEGRATION.md
|
|
@@ -49,6 +67,7 @@ files:
|
|
|
49
67
|
- guides/GETTING_STARTED.md
|
|
50
68
|
- guides/INSTRUMENTATION.md
|
|
51
69
|
- guides/LIFECYCLE_HOOKS.md
|
|
70
|
+
- guides/MONITORING_UI.md
|
|
52
71
|
- guides/OPENTELEMETRY_INTEGRATION.md
|
|
53
72
|
- guides/PARALLEL_PROCESSING.md
|
|
54
73
|
- guides/PRODUCTION_DEPLOYMENT.md
|
|
@@ -83,6 +102,15 @@ files:
|
|
|
83
102
|
- lib/job_workflow/instrumentation/opentelemetry_subscriber.rb
|
|
84
103
|
- lib/job_workflow/job_status.rb
|
|
85
104
|
- lib/job_workflow/logger.rb
|
|
105
|
+
- lib/job_workflow/monitoring.rb
|
|
106
|
+
- lib/job_workflow/monitoring/dag_layout.rb
|
|
107
|
+
- lib/job_workflow/monitoring/engine.rb
|
|
108
|
+
- lib/job_workflow/monitoring/execution_page.rb
|
|
109
|
+
- lib/job_workflow/monitoring/execution_registry.rb
|
|
110
|
+
- lib/job_workflow/monitoring/execution_view_model.rb
|
|
111
|
+
- lib/job_workflow/monitoring/parameter_filter.rb
|
|
112
|
+
- lib/job_workflow/monitoring/workflow_definition.rb
|
|
113
|
+
- lib/job_workflow/monitoring/workflow_registry.rb
|
|
86
114
|
- lib/job_workflow/output.rb
|
|
87
115
|
- lib/job_workflow/output_def.rb
|
|
88
116
|
- lib/job_workflow/queue.rb
|
|
@@ -94,6 +122,7 @@ files:
|
|
|
94
122
|
- lib/job_workflow/runner.rb
|
|
95
123
|
- lib/job_workflow/schedule.rb
|
|
96
124
|
- lib/job_workflow/semaphore.rb
|
|
125
|
+
- lib/job_workflow/sub_task_job.rb
|
|
97
126
|
- lib/job_workflow/task.rb
|
|
98
127
|
- lib/job_workflow/task_callable.rb
|
|
99
128
|
- lib/job_workflow/task_context.rb
|
|
@@ -112,7 +141,9 @@ files:
|
|
|
112
141
|
- sig-private/activejob.rbs
|
|
113
142
|
- sig-private/activesupport.rbs
|
|
114
143
|
- sig-private/aws.rbs
|
|
144
|
+
- sig-private/job-workflow.rbs
|
|
115
145
|
- sig-private/opentelemetry.rbs
|
|
146
|
+
- sig-private/rails.rbs
|
|
116
147
|
- sig-private/solid_queue.rbs
|
|
117
148
|
- sig/generated/job-workflow.rbs
|
|
118
149
|
- sig/generated/job_workflow.rbs
|
|
@@ -135,6 +166,15 @@ files:
|
|
|
135
166
|
- sig/generated/job_workflow/instrumentation/opentelemetry_subscriber.rbs
|
|
136
167
|
- sig/generated/job_workflow/job_status.rbs
|
|
137
168
|
- sig/generated/job_workflow/logger.rbs
|
|
169
|
+
- sig/generated/job_workflow/monitoring.rbs
|
|
170
|
+
- sig/generated/job_workflow/monitoring/dag_layout.rbs
|
|
171
|
+
- sig/generated/job_workflow/monitoring/engine.rbs
|
|
172
|
+
- sig/generated/job_workflow/monitoring/execution_page.rbs
|
|
173
|
+
- sig/generated/job_workflow/monitoring/execution_registry.rbs
|
|
174
|
+
- sig/generated/job_workflow/monitoring/execution_view_model.rbs
|
|
175
|
+
- sig/generated/job_workflow/monitoring/parameter_filter.rbs
|
|
176
|
+
- sig/generated/job_workflow/monitoring/workflow_definition.rbs
|
|
177
|
+
- sig/generated/job_workflow/monitoring/workflow_registry.rbs
|
|
138
178
|
- sig/generated/job_workflow/output.rbs
|
|
139
179
|
- sig/generated/job_workflow/output_def.rbs
|
|
140
180
|
- sig/generated/job_workflow/queue.rbs
|
|
@@ -146,6 +186,7 @@ files:
|
|
|
146
186
|
- sig/generated/job_workflow/runner.rbs
|
|
147
187
|
- sig/generated/job_workflow/schedule.rbs
|
|
148
188
|
- sig/generated/job_workflow/semaphore.rbs
|
|
189
|
+
- sig/generated/job_workflow/sub_task_job.rbs
|
|
149
190
|
- sig/generated/job_workflow/task.rbs
|
|
150
191
|
- sig/generated/job_workflow/task_callable.rbs
|
|
151
192
|
- sig/generated/job_workflow/task_context.rbs
|