tasker-engine 1.0.0
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 +7 -0
- data/LICENSE +22 -0
- data/README.md +443 -0
- data/Rakefile +10 -0
- data/app/controllers/tasker/analytics_controller.rb +179 -0
- data/app/controllers/tasker/application_controller.rb +45 -0
- data/app/controllers/tasker/graphql_controller.rb +193 -0
- data/app/controllers/tasker/handlers_controller.rb +217 -0
- data/app/controllers/tasker/health_controller.rb +229 -0
- data/app/controllers/tasker/metrics_controller.rb +111 -0
- data/app/controllers/tasker/page_sort.rb +97 -0
- data/app/controllers/tasker/task_diagrams_controller.rb +30 -0
- data/app/controllers/tasker/tasks_controller.rb +123 -0
- data/app/controllers/tasker/workflow_steps_controller.rb +69 -0
- data/app/graphql/examples/all_tasks.graphql +22 -0
- data/app/graphql/examples/pending_tasks.graphql +23 -0
- data/app/graphql/tasker/graph_ql_types/annotation_type.rb +14 -0
- data/app/graphql/tasker/graph_ql_types/base_argument.rb +9 -0
- data/app/graphql/tasker/graph_ql_types/base_connection.rb +11 -0
- data/app/graphql/tasker/graph_ql_types/base_edge.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_enum.rb +9 -0
- data/app/graphql/tasker/graph_ql_types/base_field.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_input_object.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_interface.rb +14 -0
- data/app/graphql/tasker/graph_ql_types/base_object.rb +10 -0
- data/app/graphql/tasker/graph_ql_types/base_scalar.rb +9 -0
- data/app/graphql/tasker/graph_ql_types/base_union.rb +11 -0
- data/app/graphql/tasker/graph_ql_types/dependent_system_object_map_type.rb +18 -0
- data/app/graphql/tasker/graph_ql_types/dependent_system_type.rb +13 -0
- data/app/graphql/tasker/graph_ql_types/mutation_type.rb +16 -0
- data/app/graphql/tasker/graph_ql_types/named_step_type.rb +16 -0
- data/app/graphql/tasker/graph_ql_types/named_task_type.rb +14 -0
- data/app/graphql/tasker/graph_ql_types/named_tasks_named_step_type.rb +19 -0
- data/app/graphql/tasker/graph_ql_types/node_type.rb +12 -0
- data/app/graphql/tasker/graph_ql_types/query_type.rb +20 -0
- data/app/graphql/tasker/graph_ql_types/task_annotation_type.rb +17 -0
- data/app/graphql/tasker/graph_ql_types/task_interface.rb +17 -0
- data/app/graphql/tasker/graph_ql_types/task_type.rb +26 -0
- data/app/graphql/tasker/graph_ql_types/workflow_step_type.rb +154 -0
- data/app/graphql/tasker/graph_ql_types.rb +42 -0
- data/app/graphql/tasker/mutations/base_mutation.rb +13 -0
- data/app/graphql/tasker/mutations/cancel_step.rb +29 -0
- data/app/graphql/tasker/mutations/cancel_task.rb +29 -0
- data/app/graphql/tasker/mutations/create_task.rb +52 -0
- data/app/graphql/tasker/mutations/update_step.rb +36 -0
- data/app/graphql/tasker/mutations/update_task.rb +41 -0
- data/app/graphql/tasker/queries/all_annotation_types.rb +17 -0
- data/app/graphql/tasker/queries/all_tasks.rb +23 -0
- data/app/graphql/tasker/queries/base_query.rb +9 -0
- data/app/graphql/tasker/queries/helpers.rb +16 -0
- data/app/graphql/tasker/queries/one_step.rb +24 -0
- data/app/graphql/tasker/queries/one_task.rb +18 -0
- data/app/graphql/tasker/queries/tasks_by_annotation.rb +31 -0
- data/app/graphql/tasker/queries/tasks_by_status.rb +30 -0
- data/app/graphql/tasker/tasker_rails_schema.rb +52 -0
- data/app/jobs/tasker/application_job.rb +8 -0
- data/app/jobs/tasker/metrics_export_job.rb +252 -0
- data/app/jobs/tasker/task_runner_job.rb +224 -0
- data/app/models/tasker/annotation_type.rb +26 -0
- data/app/models/tasker/application_record.rb +70 -0
- data/app/models/tasker/dependent_system.rb +26 -0
- data/app/models/tasker/dependent_system_object_map.rb +64 -0
- data/app/models/tasker/diagram/edge.rb +106 -0
- data/app/models/tasker/diagram/flowchart.rb +137 -0
- data/app/models/tasker/diagram/node.rb +99 -0
- data/app/models/tasker/named_step.rb +41 -0
- data/app/models/tasker/named_task.rb +121 -0
- data/app/models/tasker/named_tasks_named_step.rb +82 -0
- data/app/models/tasker/step_dag_relationship.rb +65 -0
- data/app/models/tasker/step_readiness_status.rb +59 -0
- data/app/models/tasker/task.rb +424 -0
- data/app/models/tasker/task_annotation.rb +36 -0
- data/app/models/tasker/task_diagram.rb +332 -0
- data/app/models/tasker/task_execution_context.rb +29 -0
- data/app/models/tasker/task_namespace.rb +41 -0
- data/app/models/tasker/task_transition.rb +235 -0
- data/app/models/tasker/workflow_step.rb +461 -0
- data/app/models/tasker/workflow_step_edge.rb +94 -0
- data/app/models/tasker/workflow_step_transition.rb +434 -0
- data/app/serializers/tasker/annotation_type_serializer.rb +8 -0
- data/app/serializers/tasker/handler_serializer.rb +109 -0
- data/app/serializers/tasker/task_annotation_serializer.rb +32 -0
- data/app/serializers/tasker/task_serializer.rb +168 -0
- data/app/serializers/tasker/workflow_step_serializer.rb +27 -0
- data/app/services/tasker/analytics_service.rb +409 -0
- data/app/views/tasker/task/_diagram.html.erb +32 -0
- data/config/initializers/dry_struct.rb +11 -0
- data/config/initializers/statesman.rb +6 -0
- data/config/initializers/tasker_orchestration.rb +17 -0
- data/config/initializers/time_formats.rb +4 -0
- data/config/routes.rb +34 -0
- data/config/tasker/subscriptions/example_integrations.yml +67 -0
- data/config/tasker/system_events.yml +305 -0
- data/db/functions/calculate_dependency_levels_v01.sql +45 -0
- data/db/functions/get_analytics_metrics_v01.sql +137 -0
- data/db/functions/get_slowest_steps_v01.sql +82 -0
- data/db/functions/get_slowest_tasks_v01.sql +96 -0
- data/db/functions/get_step_readiness_status_batch_v01.sql +140 -0
- data/db/functions/get_step_readiness_status_v01.sql +139 -0
- data/db/functions/get_system_health_counts_v01.sql +108 -0
- data/db/functions/get_task_execution_context_v01.sql +108 -0
- data/db/functions/get_task_execution_contexts_batch_v01.sql +104 -0
- data/db/init/schema.sql +2277 -0
- data/db/migrate/20250701165431_initial_tasker_schema.rb +116 -0
- data/db/views/tasker_step_dag_relationships_v01.sql +69 -0
- data/docs/APPLICATION_GENERATOR.md +384 -0
- data/docs/AUTH.md +1780 -0
- data/docs/CIRCUIT_BREAKER.md +224 -0
- data/docs/DEVELOPER_GUIDE.md +2665 -0
- data/docs/EVENT_SYSTEM.md +637 -0
- data/docs/EXECUTION_CONFIGURATION.md +341 -0
- data/docs/FLOW_CHART.md +149 -0
- data/docs/HEALTH.md +542 -0
- data/docs/METRICS.md +731 -0
- data/docs/OPTIMIZATION_PLAN.md +1479 -0
- data/docs/OVERVIEW.md +552 -0
- data/docs/QUICK_START.md +270 -0
- data/docs/REGISTRY_SYSTEMS.md +373 -0
- data/docs/REST_API.md +632 -0
- data/docs/ROADMAP.md +221 -0
- data/docs/SQL_FUNCTIONS.md +1408 -0
- data/docs/TASK_DIAGRAM.md +252 -0
- data/docs/TASK_EXECUTION_CONTROL_FLOW.md +237 -0
- data/docs/TELEMETRY.md +795 -0
- data/docs/TROUBLESHOOTING.md +756 -0
- data/docs/TaskHandlerGenerator.html +255 -0
- data/docs/Tasker/Analysis/RuntimeGraphAnalyzer.html +907 -0
- data/docs/Tasker/Analysis/TemplateGraphAnalyzer.html +1236 -0
- data/docs/Tasker/Analysis.html +117 -0
- data/docs/Tasker/AnalyticsController.html +450 -0
- data/docs/Tasker/AnalyticsService/BottleneckAnalytics.html +816 -0
- data/docs/Tasker/AnalyticsService/PerformanceAnalytics.html +586 -0
- data/docs/Tasker/AnalyticsService.html +2221 -0
- data/docs/Tasker/AnnotationType.html +137 -0
- data/docs/Tasker/AnnotationTypeSerializer.html +124 -0
- data/docs/Tasker/ApplicationController.html +147 -0
- data/docs/Tasker/ApplicationJob.html +128 -0
- data/docs/Tasker/ApplicationRecord.html +378 -0
- data/docs/Tasker/Authentication/AuthenticationError.html +124 -0
- data/docs/Tasker/Authentication/ConfigurationError.html +124 -0
- data/docs/Tasker/Authentication/Coordinator.html +242 -0
- data/docs/Tasker/Authentication/Interface.html +560 -0
- data/docs/Tasker/Authentication/InterfaceError.html +124 -0
- data/docs/Tasker/Authentication/NoneAuthenticator.html +338 -0
- data/docs/Tasker/Authentication.html +119 -0
- data/docs/Tasker/Authorization/AuthorizationError.html +139 -0
- data/docs/Tasker/Authorization/BaseCoordinator.html +927 -0
- data/docs/Tasker/Authorization/ConfigurationError.html +153 -0
- data/docs/Tasker/Authorization/ResourceConstants/ACTIONS.html +428 -0
- data/docs/Tasker/Authorization/ResourceConstants/RESOURCES.html +365 -0
- data/docs/Tasker/Authorization/ResourceConstants.html +146 -0
- data/docs/Tasker/Authorization/ResourceRegistry.html +882 -0
- data/docs/Tasker/Authorization/UnauthorizedError.html +153 -0
- data/docs/Tasker/Authorization.html +582 -0
- data/docs/Tasker/CacheCapabilities.html +167 -0
- data/docs/Tasker/CacheStrategy.html +1297 -0
- data/docs/Tasker/Concerns/Authenticatable.html +116 -0
- data/docs/Tasker/Concerns/Authorizable/AdminStatusChecker.html +256 -0
- data/docs/Tasker/Concerns/Authorizable.html +816 -0
- data/docs/Tasker/Concerns/ControllerAuthorizable.html +157 -0
- data/docs/Tasker/Concerns/EventPublisher.html +4023 -0
- data/docs/Tasker/Concerns/IdempotentStateTransitions.html +806 -0
- data/docs/Tasker/Concerns/LifecycleEventHelpers.html +129 -0
- data/docs/Tasker/Concerns/OrchestrationPublisher.html +129 -0
- data/docs/Tasker/Concerns/StateMachineBase/ClassMethods.html +1075 -0
- data/docs/Tasker/Concerns/StateMachineBase/StateMachineBase/ClassMethods.html +191 -0
- data/docs/Tasker/Concerns/StateMachineBase/StateMachineBase.html +126 -0
- data/docs/Tasker/Concerns/StateMachineBase.html +153 -0
- data/docs/Tasker/Concerns/StructuredLogging.html +1413 -0
- data/docs/Tasker/Concerns.html +117 -0
- data/docs/Tasker/Configuration/AuthConfiguration.html +1023 -0
- data/docs/Tasker/Configuration/ConfigurationProxy.html +581 -0
- data/docs/Tasker/Configuration/DatabaseConfiguration.html +475 -0
- data/docs/Tasker/Configuration/EngineConfiguration.html +1265 -0
- data/docs/Tasker/Configuration/HealthConfiguration.html +791 -0
- data/docs/Tasker/Configuration/TelemetryConfiguration.html +1308 -0
- data/docs/Tasker/Configuration/TelemetryConfigurationProxy.html +388 -0
- data/docs/Tasker/Configuration.html +1669 -0
- data/docs/Tasker/ConfigurationError.html +143 -0
- data/docs/Tasker/ConfiguredTask.html +514 -0
- data/docs/Tasker/Constants/EventDefinitions.html +590 -0
- data/docs/Tasker/Constants/LifecycleEvents.html +137 -0
- data/docs/Tasker/Constants/ObservabilityEvents/Step.html +152 -0
- data/docs/Tasker/Constants/ObservabilityEvents/Task.html +142 -0
- data/docs/Tasker/Constants/ObservabilityEvents.html +126 -0
- data/docs/Tasker/Constants/RegistryEvents.html +285 -0
- data/docs/Tasker/Constants/StepEvents.html +177 -0
- data/docs/Tasker/Constants/TaskEvents.html +167 -0
- data/docs/Tasker/Constants/TaskExecution/ExecutionStatus.html +207 -0
- data/docs/Tasker/Constants/TaskExecution/HealthStatus.html +191 -0
- data/docs/Tasker/Constants/TaskExecution/RecommendedAction.html +207 -0
- data/docs/Tasker/Constants/TaskExecution.html +126 -0
- data/docs/Tasker/Constants/TaskFinalization/ErrorMessages.html +132 -0
- data/docs/Tasker/Constants/TaskFinalization/PendingReasons.html +207 -0
- data/docs/Tasker/Constants/TaskFinalization/ReenqueueReasons.html +239 -0
- data/docs/Tasker/Constants/TaskFinalization.html +126 -0
- data/docs/Tasker/Constants/TaskStatuses.html +223 -0
- data/docs/Tasker/Constants/TestEvents.html +163 -0
- data/docs/Tasker/Constants/WorkflowEvents.html +222 -0
- data/docs/Tasker/Constants/WorkflowStepStatuses.html +223 -0
- data/docs/Tasker/Constants.html +561 -0
- data/docs/Tasker/DependentSystem.html +137 -0
- data/docs/Tasker/DependentSystemObjectMap.html +250 -0
- data/docs/Tasker/DetectorRegistry.html +598 -0
- data/docs/Tasker/Diagram/Edge.html +1191 -0
- data/docs/Tasker/Diagram/Flowchart.html +1539 -0
- data/docs/Tasker/Diagram/Node.html +1165 -0
- data/docs/Tasker/Diagram.html +117 -0
- data/docs/Tasker/Engine.html +215 -0
- data/docs/Tasker/Error.html +139 -0
- data/docs/Tasker/Events/Bus.html +1226 -0
- data/docs/Tasker/Events/Catalog/CatalogPrinter.html +258 -0
- data/docs/Tasker/Events/Catalog/CustomEventRegistrar.html +276 -0
- data/docs/Tasker/Events/Catalog/ExamplePayloadGenerator.html +294 -0
- data/docs/Tasker/Events/Catalog.html +1291 -0
- data/docs/Tasker/Events/CustomRegistry.html +943 -0
- data/docs/Tasker/Events/DefinitionLoader.html +575 -0
- data/docs/Tasker/Events/EventPayloadBuilder/ErrorInfoExtractor.html +286 -0
- data/docs/Tasker/Events/EventPayloadBuilder/StepPayloadBuilder.html +312 -0
- data/docs/Tasker/Events/EventPayloadBuilder.html +664 -0
- data/docs/Tasker/Events/Publisher.html +365 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber/ErrorCategorizer/ErrorTypeClassifier.html +1128 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber/ErrorCategorizer.html +270 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber/MetricTagsExtractor.html +266 -0
- data/docs/Tasker/Events/Subscribers/BaseSubscriber.html +2556 -0
- data/docs/Tasker/Events/Subscribers/MetricsSubscriber.html +723 -0
- data/docs/Tasker/Events/Subscribers/TelemetrySubscriber.html +2251 -0
- data/docs/Tasker/Events/Subscribers.html +117 -0
- data/docs/Tasker/Events/SubscriptionLoader.html +493 -0
- data/docs/Tasker/Events.html +294 -0
- data/docs/Tasker/EventsGenerator.html +459 -0
- data/docs/Tasker/Functions/FunctionBasedAnalyticsMetrics/AnalyticsMetrics.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedAnalyticsMetrics.html +412 -0
- data/docs/Tasker/Functions/FunctionBasedDependencyLevels.html +598 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestSteps/SlowestStep.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestSteps.html +453 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestTasks/SlowestTask.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedSlowestTasks.html +453 -0
- data/docs/Tasker/Functions/FunctionBasedStepReadinessStatus.html +1457 -0
- data/docs/Tasker/Functions/FunctionBasedSystemHealthCounts/HealthMetrics.html +135 -0
- data/docs/Tasker/Functions/FunctionBasedSystemHealthCounts.html +370 -0
- data/docs/Tasker/Functions/FunctionBasedTaskExecutionContext.html +1250 -0
- data/docs/Tasker/Functions/FunctionWrapper.html +479 -0
- data/docs/Tasker/Functions.html +117 -0
- data/docs/Tasker/Generators/AuthenticatorGenerator/UsageInstructionsFormatter.html +244 -0
- data/docs/Tasker/Generators/AuthenticatorGenerator.html +373 -0
- data/docs/Tasker/Generators/AuthorizationCoordinatorGenerator.html +430 -0
- data/docs/Tasker/Generators/SubscriberGenerator.html +377 -0
- data/docs/Tasker/Generators/TaskHandlerGenerator.html +263 -0
- data/docs/Tasker/Generators.html +117 -0
- data/docs/Tasker/GraphQLTypes/AnnotationType.html +132 -0
- data/docs/Tasker/GraphQLTypes/BaseArgument.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseConnection.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseEdge.html +130 -0
- data/docs/Tasker/GraphQLTypes/BaseEnum.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseField.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseInputObject.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseInterface.html +116 -0
- data/docs/Tasker/GraphQLTypes/BaseObject.html +128 -0
- data/docs/Tasker/GraphQLTypes/BaseScalar.html +124 -0
- data/docs/Tasker/GraphQLTypes/BaseUnion.html +124 -0
- data/docs/Tasker/GraphQLTypes/DependentSystemObjectMapType.html +132 -0
- data/docs/Tasker/GraphQLTypes/DependentSystemType.html +132 -0
- data/docs/Tasker/GraphQLTypes/MutationType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NamedStepType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NamedTaskType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NamedTasksNamedStepType.html +132 -0
- data/docs/Tasker/GraphQLTypes/NodeType.html +118 -0
- data/docs/Tasker/GraphQLTypes/QueryType.html +139 -0
- data/docs/Tasker/GraphQLTypes/TaskAnnotationType.html +132 -0
- data/docs/Tasker/GraphQLTypes/TaskInterface.html +111 -0
- data/docs/Tasker/GraphQLTypes/TaskType.html +201 -0
- data/docs/Tasker/GraphQLTypes/WorkflowStepType.html +694 -0
- data/docs/Tasker/GraphQLTypes.html +130 -0
- data/docs/Tasker/GraphqlController.html +251 -0
- data/docs/Tasker/HandlerFactory.html +1518 -0
- data/docs/Tasker/HandlerSerializer.html +682 -0
- data/docs/Tasker/HandlersController.html +574 -0
- data/docs/Tasker/HashIdentityStrategy.html +278 -0
- data/docs/Tasker/Health/ReadinessChecker.html +712 -0
- data/docs/Tasker/Health/StatusChecker.html +653 -0
- data/docs/Tasker/Health.html +117 -0
- data/docs/Tasker/HealthController.html +523 -0
- data/docs/Tasker/IdentityStrategy.html +276 -0
- data/docs/Tasker/InvalidTaskHandlerConfig.html +135 -0
- data/docs/Tasker/LifecycleEvents/Events/Step.html +162 -0
- data/docs/Tasker/LifecycleEvents/Events/Task.html +162 -0
- data/docs/Tasker/LifecycleEvents/Events.html +204 -0
- data/docs/Tasker/LifecycleEvents/Publisher.html +132 -0
- data/docs/Tasker/LifecycleEvents.html +799 -0
- data/docs/Tasker/Logging/CorrelationIdGenerator.html +688 -0
- data/docs/Tasker/Logging.html +115 -0
- data/docs/Tasker/MetricsController.html +293 -0
- data/docs/Tasker/MetricsExportJob.html +414 -0
- data/docs/Tasker/Mutations/BaseMutation.html +128 -0
- data/docs/Tasker/Mutations/CancelStep.html +219 -0
- data/docs/Tasker/Mutations/CancelTask.html +221 -0
- data/docs/Tasker/Mutations/CreateTask.html +243 -0
- data/docs/Tasker/Mutations/UpdateStep.html +243 -0
- data/docs/Tasker/Mutations/UpdateTask.html +243 -0
- data/docs/Tasker/Mutations.html +117 -0
- data/docs/Tasker/NamedStep.html +216 -0
- data/docs/Tasker/NamedTask.html +910 -0
- data/docs/Tasker/NamedTasksNamedStep.html +435 -0
- data/docs/Tasker/Orchestration/BackoffCalculator.html +404 -0
- data/docs/Tasker/Orchestration/ConnectionBuilder/ConfigValidator.html +258 -0
- data/docs/Tasker/Orchestration/ConnectionBuilder.html +435 -0
- data/docs/Tasker/Orchestration/ConnectionPoolIntelligence.html +513 -0
- data/docs/Tasker/Orchestration/Coordinator.html +641 -0
- data/docs/Tasker/Orchestration/FutureStateAnalyzer.html +1045 -0
- data/docs/Tasker/Orchestration/Orchestrator.html +679 -0
- data/docs/Tasker/Orchestration/PluginIntegration.html +1127 -0
- data/docs/Tasker/Orchestration/ResponseProcessor.html +504 -0
- data/docs/Tasker/Orchestration/RetryHeaderParser.html +304 -0
- data/docs/Tasker/Orchestration/StepExecutor.html +995 -0
- data/docs/Tasker/Orchestration/StepSequenceFactory.html +644 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/BlockageChecker.html +264 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/ContextManager.html +254 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/DelayCalculator.html +556 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/FinalizationDecisionMaker.html +348 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/FinalizationProcessor.html +286 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/ReasonDeterminer.html +432 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/ReenqueueManager.html +296 -0
- data/docs/Tasker/Orchestration/TaskFinalizer/UnclearStateHandler.html +314 -0
- data/docs/Tasker/Orchestration/TaskFinalizer.html +1212 -0
- data/docs/Tasker/Orchestration/TaskInitializer.html +766 -0
- data/docs/Tasker/Orchestration/TaskReenqueuer.html +506 -0
- data/docs/Tasker/Orchestration/ViableStepDiscovery.html +442 -0
- data/docs/Tasker/Orchestration/WorkflowCoordinator.html +510 -0
- data/docs/Tasker/Orchestration.html +130 -0
- data/docs/Tasker/PageSort/PageSortParamsBuilder.html +296 -0
- data/docs/Tasker/PageSort.html +247 -0
- data/docs/Tasker/PermanentError.html +518 -0
- data/docs/Tasker/ProceduralError.html +147 -0
- data/docs/Tasker/Queries/AllAnnotationTypes.html +217 -0
- data/docs/Tasker/Queries/AllTasks.html +221 -0
- data/docs/Tasker/Queries/BaseQuery.html +128 -0
- data/docs/Tasker/Queries/Helpers.html +187 -0
- data/docs/Tasker/Queries/OneStep.html +225 -0
- data/docs/Tasker/Queries/OneTask.html +217 -0
- data/docs/Tasker/Queries/TasksByAnnotation.html +231 -0
- data/docs/Tasker/Queries/TasksByStatus.html +233 -0
- data/docs/Tasker/Queries.html +119 -0
- data/docs/Tasker/Railtie.html +124 -0
- data/docs/Tasker/Registry/BaseRegistry.html +1690 -0
- data/docs/Tasker/Registry/EventPublisher.html +667 -0
- data/docs/Tasker/Registry/InterfaceValidator.html +569 -0
- data/docs/Tasker/Registry/RegistrationError.html +132 -0
- data/docs/Tasker/Registry/RegistryError.html +139 -0
- data/docs/Tasker/Registry/StatisticsCollector.html +841 -0
- data/docs/Tasker/Registry/SubscriberRegistry.html +1504 -0
- data/docs/Tasker/Registry/ValidationError.html +132 -0
- data/docs/Tasker/Registry.html +119 -0
- data/docs/Tasker/RetryableError.html +515 -0
- data/docs/Tasker/StateMachine/Compatibility.html +282 -0
- data/docs/Tasker/StateMachine/InvalidStateTransition.html +135 -0
- data/docs/Tasker/StateMachine/StepStateMachine/StandardizedPayloadBuilder.html +260 -0
- data/docs/Tasker/StateMachine/StepStateMachine.html +2215 -0
- data/docs/Tasker/StateMachine/TaskStateMachine.html +734 -0
- data/docs/Tasker/StateMachine.html +602 -0
- data/docs/Tasker/StepDagRelationship.html +657 -0
- data/docs/Tasker/StepHandler/Api/Config.html +1091 -0
- data/docs/Tasker/StepHandler/Api.html +884 -0
- data/docs/Tasker/StepHandler/AutomaticEventPublishing.html +321 -0
- data/docs/Tasker/StepHandler/Base.html +970 -0
- data/docs/Tasker/StepHandler.html +119 -0
- data/docs/Tasker/StepReadinessStatus.html +836 -0
- data/docs/Tasker/Task.html +2575 -0
- data/docs/Tasker/TaskAnnotation.html +137 -0
- data/docs/Tasker/TaskAnnotationSerializer.html +124 -0
- data/docs/Tasker/TaskBuilder/StepNameValidator.html +264 -0
- data/docs/Tasker/TaskBuilder/StepTemplateDefiner.html +264 -0
- data/docs/Tasker/TaskBuilder.html +764 -0
- data/docs/Tasker/TaskDiagram/StepToStepEdgeBuilder.html +260 -0
- data/docs/Tasker/TaskDiagram/TaskToRootStepEdgeBuilder.html +290 -0
- data/docs/Tasker/TaskDiagram.html +548 -0
- data/docs/Tasker/TaskDiagramsController.html +240 -0
- data/docs/Tasker/TaskExecutionContext.html +469 -0
- data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner/ClassBasedEventRegistrar.html +238 -0
- data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner/YamlEventRegistrar.html +254 -0
- data/docs/Tasker/TaskHandler/ClassMethods/StepTemplateDefiner.html +988 -0
- data/docs/Tasker/TaskHandler/ClassMethods.html +357 -0
- data/docs/Tasker/TaskHandler/InstanceMethods.html +1396 -0
- data/docs/Tasker/TaskHandler/StepGroup.html +1748 -0
- data/docs/Tasker/TaskHandler.html +271 -0
- data/docs/Tasker/TaskNamespace.html +312 -0
- data/docs/Tasker/TaskRunnerJob.html +406 -0
- data/docs/Tasker/TaskSerializer.html +474 -0
- data/docs/Tasker/TaskTransition.html +1517 -0
- data/docs/Tasker/TaskWorkflowSummary.html +988 -0
- data/docs/Tasker/TaskerRailsSchema/InvalidObjectTypeError.html +132 -0
- data/docs/Tasker/TaskerRailsSchema/TypeResolutionError.html +139 -0
- data/docs/Tasker/TaskerRailsSchema/UnknownInterfaceError.html +132 -0
- data/docs/Tasker/TaskerRailsSchema.html +384 -0
- data/docs/Tasker/TasksController.html +595 -0
- data/docs/Tasker/Telemetry/EventMapping.html +1307 -0
- data/docs/Tasker/Telemetry/EventRouter.html +2178 -0
- data/docs/Tasker/Telemetry/Events/ExportEvents.html +246 -0
- data/docs/Tasker/Telemetry/Events.html +115 -0
- data/docs/Tasker/Telemetry/ExportCoordinator/DistributedLockTimeoutError.html +135 -0
- data/docs/Tasker/Telemetry/ExportCoordinator.html +2137 -0
- data/docs/Tasker/Telemetry/IntelligentCacheManager.html +1083 -0
- data/docs/Tasker/Telemetry/LogBackend.html +1088 -0
- data/docs/Tasker/Telemetry/MetricTypes/Counter.html +1054 -0
- data/docs/Tasker/Telemetry/MetricTypes/Gauge.html +1270 -0
- data/docs/Tasker/Telemetry/MetricTypes/Histogram.html +1492 -0
- data/docs/Tasker/Telemetry/MetricTypes.html +153 -0
- data/docs/Tasker/Telemetry/MetricsBackend.html +2510 -0
- data/docs/Tasker/Telemetry/MetricsExportService.html +578 -0
- data/docs/Tasker/Telemetry/PluginRegistry.html +1774 -0
- data/docs/Tasker/Telemetry/Plugins/BaseExporter.html +1835 -0
- data/docs/Tasker/Telemetry/Plugins/CsvExporter.html +768 -0
- data/docs/Tasker/Telemetry/Plugins/JsonExporter.html +747 -0
- data/docs/Tasker/Telemetry/Plugins.html +117 -0
- data/docs/Tasker/Telemetry/PrometheusExporter.html +481 -0
- data/docs/Tasker/Telemetry/TraceBackend.html +891 -0
- data/docs/Tasker/Telemetry.html +130 -0
- data/docs/Tasker/Types/AuthConfig.html +886 -0
- data/docs/Tasker/Types/BackoffConfig.html +1063 -0
- data/docs/Tasker/Types/BaseConfig.html +227 -0
- data/docs/Tasker/Types/CacheConfig.html +1731 -0
- data/docs/Tasker/Types/DatabaseConfig.html +388 -0
- data/docs/Tasker/Types/DependencyGraph.html +526 -0
- data/docs/Tasker/Types/DependencyGraphConfig.html +753 -0
- data/docs/Tasker/Types/EngineConfig.html +1181 -0
- data/docs/Tasker/Types/ExecutionConfig.html +1963 -0
- data/docs/Tasker/Types/GraphEdge.html +517 -0
- data/docs/Tasker/Types/GraphMetadata.html +781 -0
- data/docs/Tasker/Types/GraphNode.html +694 -0
- data/docs/Tasker/Types/HealthConfig.html +784 -0
- data/docs/Tasker/Types/StepSequence.html +353 -0
- data/docs/Tasker/Types/StepTemplate.html +1193 -0
- data/docs/Tasker/Types/TaskRequest.html +1179 -0
- data/docs/Tasker/Types/TelemetryConfig.html +2746 -0
- data/docs/Tasker/Types.html +154 -0
- data/docs/Tasker/WorkflowStep/StepFinder.html +282 -0
- data/docs/Tasker/WorkflowStep.html +2724 -0
- data/docs/Tasker/WorkflowStepEdge.html +304 -0
- data/docs/Tasker/WorkflowStepSerializer.html +305 -0
- data/docs/Tasker/WorkflowStepTransition/TransitionDescriptionFormatter.html +282 -0
- data/docs/Tasker/WorkflowStepTransition.html +2201 -0
- data/docs/Tasker/WorkflowStepsController.html +462 -0
- data/docs/Tasker.html +452 -0
- data/docs/VISION.md +584 -0
- data/docs/WHY.md +21 -0
- data/docs/_index.html +2375 -0
- data/docs/class_list.html +54 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +503 -0
- data/docs/events/migration_plan_outcomes.md +80 -0
- data/docs/file.README.html +541 -0
- data/docs/file_list.html +59 -0
- data/docs/frames.html +22 -0
- data/docs/index.html +541 -0
- data/docs/js/app.js +344 -0
- data/docs/js/full_list.js +242 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +9182 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/generators/tasker/authenticator_generator.rb +301 -0
- data/lib/generators/tasker/authorization_coordinator_generator.rb +139 -0
- data/lib/generators/tasker/events_generator.rb +91 -0
- data/lib/generators/tasker/subscriber_generator.rb +107 -0
- data/lib/generators/tasker/task_handler_generator.rb +138 -0
- data/lib/generators/tasker/templates/api_token_authenticator.rb.erb +113 -0
- data/lib/generators/tasker/templates/api_token_authenticator_spec.rb.erb +144 -0
- data/lib/generators/tasker/templates/authorization_coordinator.rb.erb +95 -0
- data/lib/generators/tasker/templates/authorization_coordinator_spec.rb.erb +142 -0
- data/lib/generators/tasker/templates/custom_authenticator.rb.erb +108 -0
- data/lib/generators/tasker/templates/custom_authenticator_spec.rb.erb +162 -0
- data/lib/generators/tasker/templates/custom_events.yml.erb +62 -0
- data/lib/generators/tasker/templates/custom_subscriber.rb.erb +72 -0
- data/lib/generators/tasker/templates/devise_authenticator.rb.erb +101 -0
- data/lib/generators/tasker/templates/devise_authenticator_spec.rb.erb +126 -0
- data/lib/generators/tasker/templates/initialize.rb.erb +202 -0
- data/lib/generators/tasker/templates/jwt_authenticator.rb.erb +144 -0
- data/lib/generators/tasker/templates/jwt_authenticator_spec.rb.erb +298 -0
- data/lib/generators/tasker/templates/metrics_subscriber.rb.erb +258 -0
- data/lib/generators/tasker/templates/metrics_subscriber_spec.rb.erb +308 -0
- data/lib/generators/tasker/templates/omniauth_authenticator.rb.erb +135 -0
- data/lib/generators/tasker/templates/omniauth_authenticator_spec.rb.erb +196 -0
- data/lib/generators/tasker/templates/opentelemetry_initializer.rb +52 -0
- data/lib/generators/tasker/templates/subscriber.rb.erb +64 -0
- data/lib/generators/tasker/templates/subscriber_spec.rb.erb +80 -0
- data/lib/generators/tasker/templates/task_config.yaml.erb +117 -0
- data/lib/generators/tasker/templates/task_handler.rb.erb +59 -0
- data/lib/generators/tasker/templates/task_handler_spec.rb.erb +159 -0
- data/lib/tasker/analysis/runtime_graph_analyzer.rb +1168 -0
- data/lib/tasker/analysis/template_graph_analyzer.rb +328 -0
- data/lib/tasker/authentication/coordinator.rb +78 -0
- data/lib/tasker/authentication/errors.rb +9 -0
- data/lib/tasker/authentication/interface.rb +36 -0
- data/lib/tasker/authentication/none_authenticator.rb +26 -0
- data/lib/tasker/authorization/base_coordinator.rb +112 -0
- data/lib/tasker/authorization/errors.rb +26 -0
- data/lib/tasker/authorization/resource_constants.rb +74 -0
- data/lib/tasker/authorization/resource_registry.rb +143 -0
- data/lib/tasker/authorization.rb +75 -0
- data/lib/tasker/cache_capabilities.rb +131 -0
- data/lib/tasker/cache_strategy.rb +469 -0
- data/lib/tasker/concerns/authenticatable.rb +41 -0
- data/lib/tasker/concerns/authorizable.rb +204 -0
- data/lib/tasker/concerns/controller_authorizable.rb +124 -0
- data/lib/tasker/concerns/event_publisher.rb +716 -0
- data/lib/tasker/concerns/idempotent_state_transitions.rb +128 -0
- data/lib/tasker/concerns/state_machine_base.rb +218 -0
- data/lib/tasker/concerns/structured_logging.rb +387 -0
- data/lib/tasker/configuration.rb +325 -0
- data/lib/tasker/constants/event_definitions.rb +147 -0
- data/lib/tasker/constants/registry_events.rb +54 -0
- data/lib/tasker/constants.rb +417 -0
- data/lib/tasker/engine.rb +90 -0
- data/lib/tasker/errors.rb +90 -0
- data/lib/tasker/events/catalog.rb +432 -0
- data/lib/tasker/events/custom_registry.rb +175 -0
- data/lib/tasker/events/definition_loader.rb +199 -0
- data/lib/tasker/events/event_payload_builder.rb +461 -0
- data/lib/tasker/events/publisher.rb +149 -0
- data/lib/tasker/events/subscribers/base_subscriber.rb +601 -0
- data/lib/tasker/events/subscribers/metrics_subscriber.rb +120 -0
- data/lib/tasker/events/subscribers/telemetry_subscriber.rb +462 -0
- data/lib/tasker/events/subscription_loader.rb +161 -0
- data/lib/tasker/events.rb +37 -0
- data/lib/tasker/functions/function_based_analytics_metrics.rb +103 -0
- data/lib/tasker/functions/function_based_dependency_levels.rb +54 -0
- data/lib/tasker/functions/function_based_slowest_steps.rb +84 -0
- data/lib/tasker/functions/function_based_slowest_tasks.rb +84 -0
- data/lib/tasker/functions/function_based_step_readiness_status.rb +183 -0
- data/lib/tasker/functions/function_based_system_health_counts.rb +94 -0
- data/lib/tasker/functions/function_based_task_execution_context.rb +148 -0
- data/lib/tasker/functions/function_wrapper.rb +42 -0
- data/lib/tasker/functions.rb +12 -0
- data/lib/tasker/handler_factory.rb +322 -0
- data/lib/tasker/health/readiness_checker.rb +186 -0
- data/lib/tasker/health/status_checker.rb +203 -0
- data/lib/tasker/identity_strategy.rb +38 -0
- data/lib/tasker/logging/correlation_id_generator.rb +120 -0
- data/lib/tasker/orchestration/backoff_calculator.rb +184 -0
- data/lib/tasker/orchestration/connection_builder.rb +122 -0
- data/lib/tasker/orchestration/connection_pool_intelligence.rb +177 -0
- data/lib/tasker/orchestration/coordinator.rb +119 -0
- data/lib/tasker/orchestration/future_state_analyzer.rb +137 -0
- data/lib/tasker/orchestration/plugin_integration.rb +124 -0
- data/lib/tasker/orchestration/response_processor.rb +168 -0
- data/lib/tasker/orchestration/retry_header_parser.rb +78 -0
- data/lib/tasker/orchestration/step_executor.rb +941 -0
- data/lib/tasker/orchestration/step_sequence_factory.rb +67 -0
- data/lib/tasker/orchestration/task_finalizer.rb +564 -0
- data/lib/tasker/orchestration/task_initializer.rb +140 -0
- data/lib/tasker/orchestration/task_reenqueuer.rb +71 -0
- data/lib/tasker/orchestration/viable_step_discovery.rb +65 -0
- data/lib/tasker/orchestration/workflow_coordinator.rb +294 -0
- data/lib/tasker/orchestration.rb +45 -0
- data/lib/tasker/railtie.rb +9 -0
- data/lib/tasker/registry/base_registry.rb +177 -0
- data/lib/tasker/registry/event_publisher.rb +91 -0
- data/lib/tasker/registry/interface_validator.rb +140 -0
- data/lib/tasker/registry/statistics_collector.rb +381 -0
- data/lib/tasker/registry/subscriber_registry.rb +285 -0
- data/lib/tasker/registry.rb +22 -0
- data/lib/tasker/state_machine/step_state_machine.rb +508 -0
- data/lib/tasker/state_machine/task_state_machine.rb +192 -0
- data/lib/tasker/state_machine.rb +83 -0
- data/lib/tasker/step_handler/api.rb +410 -0
- data/lib/tasker/step_handler/base.rb +206 -0
- data/lib/tasker/task_builder.rb +432 -0
- data/lib/tasker/task_handler/class_methods.rb +324 -0
- data/lib/tasker/task_handler/instance_methods.rb +293 -0
- data/lib/tasker/task_handler/step_group.rb +182 -0
- data/lib/tasker/task_handler.rb +43 -0
- data/lib/tasker/telemetry/event_mapping.rb +126 -0
- data/lib/tasker/telemetry/event_router.rb +318 -0
- data/lib/tasker/telemetry/events/export_events.rb +38 -0
- data/lib/tasker/telemetry/export_coordinator.rb +497 -0
- data/lib/tasker/telemetry/intelligent_cache_manager.rb +508 -0
- data/lib/tasker/telemetry/log_backend.rb +224 -0
- data/lib/tasker/telemetry/metric_types.rb +368 -0
- data/lib/tasker/telemetry/metrics_backend.rb +1227 -0
- data/lib/tasker/telemetry/metrics_export_service.rb +392 -0
- data/lib/tasker/telemetry/plugin_registry.rb +333 -0
- data/lib/tasker/telemetry/plugins/base_exporter.rb +246 -0
- data/lib/tasker/telemetry/plugins/csv_exporter.rb +198 -0
- data/lib/tasker/telemetry/plugins/json_exporter.rb +141 -0
- data/lib/tasker/telemetry/prometheus_exporter.rb +249 -0
- data/lib/tasker/telemetry/trace_backend.rb +186 -0
- data/lib/tasker/telemetry.rb +59 -0
- data/lib/tasker/types/auth_config.rb +81 -0
- data/lib/tasker/types/backoff_config.rb +142 -0
- data/lib/tasker/types/cache_config.rb +257 -0
- data/lib/tasker/types/database_config.rb +39 -0
- data/lib/tasker/types/dependency_graph.rb +225 -0
- data/lib/tasker/types/dependency_graph_config.rb +149 -0
- data/lib/tasker/types/engine_config.rb +131 -0
- data/lib/tasker/types/execution_config.rb +289 -0
- data/lib/tasker/types/health_config.rb +84 -0
- data/lib/tasker/types/step_sequence.rb +24 -0
- data/lib/tasker/types/step_template.rb +63 -0
- data/lib/tasker/types/task_request.rb +60 -0
- data/lib/tasker/types/telemetry_config.rb +273 -0
- data/lib/tasker/types.rb +64 -0
- data/lib/tasker/version.rb +7 -0
- data/lib/tasker.rb +82 -0
- data/lib/tasks/tasker_tasks.rake +302 -0
- metadata +958 -0
@@ -0,0 +1,2724 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Tasker::WorkflowStep
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.37
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Tasker::WorkflowStep";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (W)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Tasker.html" title="Tasker (module)">Tasker</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">WorkflowStep</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Tasker::WorkflowStep
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="ApplicationRecord.html" title="Tasker::ApplicationRecord (class)">ApplicationRecord</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">ActiveRecord::Base</li>
|
78
|
+
|
79
|
+
<li class="next"><span class='object_link'><a href="ApplicationRecord.html" title="Tasker::ApplicationRecord (class)">ApplicationRecord</a></span></li>
|
80
|
+
|
81
|
+
<li class="next">Tasker::WorkflowStep</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
</dl>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<dl>
|
100
|
+
<dt>Defined in:</dt>
|
101
|
+
<dd>app/models/tasker/workflow_step.rb</dd>
|
102
|
+
</dl>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<h2>Defined Under Namespace</h2>
|
107
|
+
<p class="children">
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="WorkflowStep/StepFinder.html" title="Tasker::WorkflowStep::StepFinder (class)">StepFinder</a></span>
|
113
|
+
|
114
|
+
|
115
|
+
</p>
|
116
|
+
|
117
|
+
|
118
|
+
<h2>
|
119
|
+
Constant Summary
|
120
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
121
|
+
</h2>
|
122
|
+
|
123
|
+
<dl class="constants">
|
124
|
+
|
125
|
+
<dt id="PROVIDES_EDGE_NAME-constant" class="">PROVIDES_EDGE_NAME =
|
126
|
+
|
127
|
+
</dt>
|
128
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>provides</span><span class='tstring_end'>'</span></span></pre></dd>
|
129
|
+
|
130
|
+
</dl>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<h2>
|
141
|
+
Class Method Summary
|
142
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
143
|
+
</h2>
|
144
|
+
|
145
|
+
<ul class="summary">
|
146
|
+
|
147
|
+
<li class="public ">
|
148
|
+
<span class="summary_signature">
|
149
|
+
|
150
|
+
<a href="#build_default_step!-class_method" title="build_default_step! (class method)">.<strong>build_default_step!</strong>(task, template, named_step) ⇒ Object </a>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
165
|
+
|
166
|
+
</li>
|
167
|
+
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#by_current_state-class_method" title="by_current_state (class method)">.<strong>by_current_state</strong> ⇒ ActiveRecord::Relation </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
<span class="summary_desc"><div class='inline'>
|
187
|
+
<p>Scopes workflow steps by their current state using state machine transitions.</p>
|
188
|
+
</div></span>
|
189
|
+
|
190
|
+
</li>
|
191
|
+
|
192
|
+
|
193
|
+
<li class="public ">
|
194
|
+
<span class="summary_signature">
|
195
|
+
|
196
|
+
<a href="#completed_since-class_method" title="completed_since (class method)">.<strong>completed_since</strong> ⇒ ActiveRecord::Relation </a>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
</span>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<span class="summary_desc"><div class='inline'>
|
211
|
+
<p>Scopes workflow steps completed since a specific time.</p>
|
212
|
+
</div></span>
|
213
|
+
|
214
|
+
</li>
|
215
|
+
|
216
|
+
|
217
|
+
<li class="public ">
|
218
|
+
<span class="summary_signature">
|
219
|
+
|
220
|
+
<a href="#failed_since-class_method" title="failed_since (class method)">.<strong>failed_since</strong> ⇒ ActiveRecord::Relation </a>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
</span>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
<span class="summary_desc"><div class='inline'>
|
235
|
+
<p>Scopes workflow steps that failed since a specific time.</p>
|
236
|
+
</div></span>
|
237
|
+
|
238
|
+
</li>
|
239
|
+
|
240
|
+
|
241
|
+
<li class="public ">
|
242
|
+
<span class="summary_signature">
|
243
|
+
|
244
|
+
<a href="#find_step_by_name-class_method" title="find_step_by_name (class method)">.<strong>find_step_by_name</strong>(steps, name) ⇒ WorkflowStep<sup>?</sup> </a>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
</span>
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
<span class="summary_desc"><div class='inline'>
|
259
|
+
<p>Finds a WorkflowStep with the given name by traversing the DAG efficiently.</p>
|
260
|
+
</div></span>
|
261
|
+
|
262
|
+
</li>
|
263
|
+
|
264
|
+
|
265
|
+
<li class="public ">
|
266
|
+
<span class="summary_signature">
|
267
|
+
|
268
|
+
<a href="#for_tasks_since-class_method" title="for_tasks_since (class method)">.<strong>for_tasks_since</strong> ⇒ ActiveRecord::Relation </a>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
</span>
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
<span class="summary_desc"><div class='inline'>
|
283
|
+
<p>Scopes workflow steps for tasks created since a specific time.</p>
|
284
|
+
</div></span>
|
285
|
+
|
286
|
+
</li>
|
287
|
+
|
288
|
+
|
289
|
+
<li class="public ">
|
290
|
+
<span class="summary_signature">
|
291
|
+
|
292
|
+
<a href="#get_steps_for_task-class_method" title="get_steps_for_task (class method)">.<strong>get_steps_for_task</strong>(task, templates) ⇒ Object </a>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
</span>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
307
|
+
|
308
|
+
</li>
|
309
|
+
|
310
|
+
|
311
|
+
<li class="public ">
|
312
|
+
<span class="summary_signature">
|
313
|
+
|
314
|
+
<a href="#get_viable_steps-class_method" title="get_viable_steps (class method)">.<strong>get_viable_steps</strong>(task, sequence) ⇒ Object </a>
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
</span>
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
329
|
+
|
330
|
+
</li>
|
331
|
+
|
332
|
+
|
333
|
+
<li class="public ">
|
334
|
+
<span class="summary_signature">
|
335
|
+
|
336
|
+
<a href="#set_up_dependent_steps-class_method" title="set_up_dependent_steps (class method)">.<strong>set_up_dependent_steps</strong>(steps, templates) ⇒ Object </a>
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
</span>
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
351
|
+
|
352
|
+
</li>
|
353
|
+
|
354
|
+
|
355
|
+
<li class="public ">
|
356
|
+
<span class="summary_signature">
|
357
|
+
|
358
|
+
<a href="#task_completion_stats-class_method" title="task_completion_stats (class method)">.<strong>task_completion_stats</strong>(task) ⇒ Hash </a>
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
</span>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
<span class="summary_desc"><div class='inline'>
|
373
|
+
<p>Efficient method to get task completion statistics using ActiveRecord scopes This avoids the N+1 query problem while working with the state machine system.</p>
|
374
|
+
</div></span>
|
375
|
+
|
376
|
+
</li>
|
377
|
+
|
378
|
+
|
379
|
+
</ul>
|
380
|
+
|
381
|
+
<h2>
|
382
|
+
Instance Method Summary
|
383
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
384
|
+
</h2>
|
385
|
+
|
386
|
+
<ul class="summary">
|
387
|
+
|
388
|
+
<li class="public ">
|
389
|
+
<span class="summary_signature">
|
390
|
+
|
391
|
+
<a href="#add_provides_edge!-instance_method" title="#add_provides_edge! (instance method)">#<strong>add_provides_edge!</strong>(to_step) ⇒ Object </a>
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
</span>
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
406
|
+
|
407
|
+
</li>
|
408
|
+
|
409
|
+
|
410
|
+
<li class="public ">
|
411
|
+
<span class="summary_signature">
|
412
|
+
|
413
|
+
<a href="#can_retry_now%3F-instance_method" title="#can_retry_now? (instance method)">#<strong>can_retry_now?</strong> ⇒ Boolean </a>
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
</span>
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
428
|
+
|
429
|
+
</li>
|
430
|
+
|
431
|
+
|
432
|
+
<li class="public ">
|
433
|
+
<span class="summary_signature">
|
434
|
+
|
435
|
+
<a href="#cancelled%3F-instance_method" title="#cancelled? (instance method)">#<strong>cancelled?</strong> ⇒ Boolean </a>
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
</span>
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
450
|
+
|
451
|
+
</li>
|
452
|
+
|
453
|
+
|
454
|
+
<li class="public ">
|
455
|
+
<span class="summary_signature">
|
456
|
+
|
457
|
+
<a href="#complete%3F-instance_method" title="#complete? (instance method)">#<strong>complete?</strong> ⇒ Boolean </a>
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
</span>
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
472
|
+
|
473
|
+
</li>
|
474
|
+
|
475
|
+
|
476
|
+
<li class="public ">
|
477
|
+
<span class="summary_signature">
|
478
|
+
|
479
|
+
<a href="#dependencies_satisfied%3F-instance_method" title="#dependencies_satisfied? (instance method)">#<strong>dependencies_satisfied?</strong> ⇒ Boolean </a>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
</span>
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
<span class="summary_desc"><div class='inline'>
|
494
|
+
<p>Function-based predicate methods.</p>
|
495
|
+
</div></span>
|
496
|
+
|
497
|
+
</li>
|
498
|
+
|
499
|
+
|
500
|
+
<li class="public ">
|
501
|
+
<span class="summary_signature">
|
502
|
+
|
503
|
+
<a href="#has_retry_attempts%3F-instance_method" title="#has_retry_attempts? (instance method)">#<strong>has_retry_attempts?</strong> ⇒ Boolean </a>
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
</span>
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
518
|
+
|
519
|
+
</li>
|
520
|
+
|
521
|
+
|
522
|
+
<li class="public ">
|
523
|
+
<span class="summary_signature">
|
524
|
+
|
525
|
+
<a href="#in_error%3F-instance_method" title="#in_error? (instance method)">#<strong>in_error?</strong> ⇒ Boolean </a>
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
</span>
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
540
|
+
|
541
|
+
</li>
|
542
|
+
|
543
|
+
|
544
|
+
<li class="public ">
|
545
|
+
<span class="summary_signature">
|
546
|
+
|
547
|
+
<a href="#in_progress%3F-instance_method" title="#in_progress? (instance method)">#<strong>in_progress?</strong> ⇒ Boolean </a>
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
</span>
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
562
|
+
|
563
|
+
</li>
|
564
|
+
|
565
|
+
|
566
|
+
<li class="public ">
|
567
|
+
<span class="summary_signature">
|
568
|
+
|
569
|
+
<a href="#leaf_step%3F-instance_method" title="#leaf_step? (instance method)">#<strong>leaf_step?</strong> ⇒ Boolean </a>
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
</span>
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
584
|
+
|
585
|
+
</li>
|
586
|
+
|
587
|
+
|
588
|
+
<li class="public ">
|
589
|
+
<span class="summary_signature">
|
590
|
+
|
591
|
+
<a href="#pending%3F-instance_method" title="#pending? (instance method)">#<strong>pending?</strong> ⇒ Boolean </a>
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
</span>
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
606
|
+
|
607
|
+
</li>
|
608
|
+
|
609
|
+
|
610
|
+
<li class="public ">
|
611
|
+
<span class="summary_signature">
|
612
|
+
|
613
|
+
<a href="#ready%3F-instance_method" title="#ready? (instance method)">#<strong>ready?</strong> ⇒ Boolean </a>
|
614
|
+
|
615
|
+
|
616
|
+
|
617
|
+
</span>
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
628
|
+
|
629
|
+
</li>
|
630
|
+
|
631
|
+
|
632
|
+
<li class="public ">
|
633
|
+
<span class="summary_signature">
|
634
|
+
|
635
|
+
<a href="#ready_status%3F-instance_method" title="#ready_status? (instance method)">#<strong>ready_status?</strong> ⇒ Boolean </a>
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
</span>
|
640
|
+
|
641
|
+
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
650
|
+
|
651
|
+
</li>
|
652
|
+
|
653
|
+
|
654
|
+
<li class="public ">
|
655
|
+
<span class="summary_signature">
|
656
|
+
|
657
|
+
<a href="#reload-instance_method" title="#reload (instance method)">#<strong>reload</strong> ⇒ Object </a>
|
658
|
+
|
659
|
+
|
660
|
+
|
661
|
+
</span>
|
662
|
+
|
663
|
+
|
664
|
+
|
665
|
+
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
672
|
+
|
673
|
+
</li>
|
674
|
+
|
675
|
+
|
676
|
+
<li class="public ">
|
677
|
+
<span class="summary_signature">
|
678
|
+
|
679
|
+
<a href="#retry_eligible%3F-instance_method" title="#retry_eligible? (instance method)">#<strong>retry_eligible?</strong> ⇒ Boolean </a>
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
</span>
|
684
|
+
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
694
|
+
|
695
|
+
</li>
|
696
|
+
|
697
|
+
|
698
|
+
<li class="public ">
|
699
|
+
<span class="summary_signature">
|
700
|
+
|
701
|
+
<a href="#retry_exhausted%3F-instance_method" title="#retry_exhausted? (instance method)">#<strong>retry_exhausted?</strong> ⇒ Boolean </a>
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
</span>
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
|
714
|
+
|
715
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
716
|
+
|
717
|
+
</li>
|
718
|
+
|
719
|
+
|
720
|
+
<li class="public ">
|
721
|
+
<span class="summary_signature">
|
722
|
+
|
723
|
+
<a href="#root_step%3F-instance_method" title="#root_step? (instance method)">#<strong>root_step?</strong> ⇒ Boolean </a>
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
</span>
|
728
|
+
|
729
|
+
|
730
|
+
|
731
|
+
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
738
|
+
|
739
|
+
</li>
|
740
|
+
|
741
|
+
|
742
|
+
<li class="public ">
|
743
|
+
<span class="summary_signature">
|
744
|
+
|
745
|
+
<a href="#state_machine-instance_method" title="#state_machine (instance method)">#<strong>state_machine</strong> ⇒ Object </a>
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
</span>
|
750
|
+
|
751
|
+
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
|
758
|
+
|
759
|
+
<span class="summary_desc"><div class='inline'>
|
760
|
+
<p>State machine integration.</p>
|
761
|
+
</div></span>
|
762
|
+
|
763
|
+
</li>
|
764
|
+
|
765
|
+
|
766
|
+
<li class="public ">
|
767
|
+
<span class="summary_signature">
|
768
|
+
|
769
|
+
<a href="#status-instance_method" title="#status (instance method)">#<strong>status</strong> ⇒ Object </a>
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
</span>
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
<span class="summary_desc"><div class='inline'>
|
784
|
+
<p>Status is now entirely managed by the state machine.</p>
|
785
|
+
</div></span>
|
786
|
+
|
787
|
+
</li>
|
788
|
+
|
789
|
+
|
790
|
+
<li class="public ">
|
791
|
+
<span class="summary_signature">
|
792
|
+
|
793
|
+
<a href="#step_readiness_status-instance_method" title="#step_readiness_status (instance method)">#<strong>step_readiness_status</strong> ⇒ Object </a>
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
</span>
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
|
806
|
+
|
807
|
+
<span class="summary_desc"><div class='inline'>
|
808
|
+
<p>Helper method to get step readiness status using function-based approach.</p>
|
809
|
+
</div></span>
|
810
|
+
|
811
|
+
</li>
|
812
|
+
|
813
|
+
|
814
|
+
<li class="public ">
|
815
|
+
<span class="summary_signature">
|
816
|
+
|
817
|
+
<a href="#waiting_for_backoff%3F-instance_method" title="#waiting_for_backoff? (instance method)">#<strong>waiting_for_backoff?</strong> ⇒ Boolean </a>
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
</span>
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
832
|
+
|
833
|
+
</li>
|
834
|
+
|
835
|
+
|
836
|
+
</ul>
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
|
848
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="ApplicationRecord.html" title="Tasker::ApplicationRecord (class)">ApplicationRecord</a></span></h3>
|
849
|
+
<p class="inherited"><span class='object_link'><a href="ApplicationRecord.html#configure_database_connections-class_method" title="Tasker::ApplicationRecord.configure_database_connections (method)">configure_database_connections</a></span>, <span class='object_link'><a href="ApplicationRecord.html#database_configuration_exists%3F-class_method" title="Tasker::ApplicationRecord.database_configuration_exists? (method)">database_configuration_exists?</a></span></p>
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
<div id="class_method_details" class="method_details_list">
|
854
|
+
<h2>Class Method Details</h2>
|
855
|
+
|
856
|
+
|
857
|
+
<div class="method_details first">
|
858
|
+
<h3 class="signature first" id="build_default_step!-class_method">
|
859
|
+
|
860
|
+
.<strong>build_default_step!</strong>(task, template, named_step) ⇒ <tt>Object</tt>
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
|
865
|
+
|
866
|
+
</h3><table class="source_code">
|
867
|
+
<tr>
|
868
|
+
<td>
|
869
|
+
<pre class="lines">
|
870
|
+
|
871
|
+
|
872
|
+
300
|
873
|
+
301
|
874
|
+
302
|
875
|
+
303
|
876
|
+
304
|
877
|
+
305
|
878
|
+
306
|
879
|
+
307
|
880
|
+
308
|
881
|
+
309
|
882
|
+
310
|
883
|
+
311
|
884
|
+
312
|
885
|
+
313
|
886
|
+
314
|
887
|
+
315
|
888
|
+
316
|
889
|
+
317
|
890
|
+
318
|
891
|
+
319
|
892
|
+
320
|
893
|
+
321
|
894
|
+
322
|
895
|
+
323
|
896
|
+
324</pre>
|
897
|
+
</td>
|
898
|
+
<td>
|
899
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 300</span>
|
900
|
+
|
901
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build_default_step!'>build_default_step!</span><span class='lparen'>(</span><span class='id identifier rubyid_task'>task</span><span class='comma'>,</span> <span class='id identifier rubyid_template'>template</span><span class='comma'>,</span> <span class='id identifier rubyid_named_step'>named_step</span><span class='rparen'>)</span>
|
902
|
+
<span class='comment'># Create the step first without status
|
903
|
+
</span> <span class='id identifier rubyid_step_attributes'>step_attributes</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
904
|
+
<span class='label'>task_id:</span> <span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_task_id'>task_id</span><span class='comma'>,</span>
|
905
|
+
<span class='label'>named_step_id:</span> <span class='id identifier rubyid_named_step'>named_step</span><span class='period'>.</span><span class='id identifier rubyid_named_step_id'>named_step_id</span><span class='comma'>,</span>
|
906
|
+
<span class='label'>retryable:</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_default_retryable'>default_retryable</span><span class='comma'>,</span>
|
907
|
+
<span class='label'>retry_limit:</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_default_retry_limit'>default_retry_limit</span><span class='comma'>,</span>
|
908
|
+
<span class='label'>skippable:</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_skippable'>skippable</span><span class='comma'>,</span>
|
909
|
+
<span class='label'>in_process:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
910
|
+
<span class='label'>inputs:</span> <span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_context'>context</span><span class='comma'>,</span>
|
911
|
+
<span class='label'>processed:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
912
|
+
<span class='label'>attempts:</span> <span class='int'>0</span><span class='comma'>,</span>
|
913
|
+
<span class='label'>results:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
914
|
+
<span class='rbrace'>}</span>
|
915
|
+
|
916
|
+
<span class='id identifier rubyid_step'>step</span> <span class='op'>=</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_step_attributes'>step_attributes</span><span class='rparen'>)</span>
|
917
|
+
<span class='id identifier rubyid_step'>step</span><span class='period'>.</span><span class='id identifier rubyid_save!'>save!</span>
|
918
|
+
|
919
|
+
<span class='comment'># REMOVED: Automatic state machine initialization to prevent duplicate key violations
|
920
|
+
</span> <span class='comment'># The state machine will initialize naturally when accessed, and factories may
|
921
|
+
</span> <span class='comment'># have already created transitions through their own setup
|
922
|
+
</span> <span class='comment'># step.state_machine.initialize_state_machine!
|
923
|
+
</span>
|
924
|
+
<span class='id identifier rubyid_step'>step</span>
|
925
|
+
<span class='kw'>end</span></pre>
|
926
|
+
</td>
|
927
|
+
</tr>
|
928
|
+
</table>
|
929
|
+
</div>
|
930
|
+
|
931
|
+
<div class="method_details ">
|
932
|
+
<h3 class="signature " id="by_current_state-class_method">
|
933
|
+
|
934
|
+
.<strong>by_current_state</strong> ⇒ <tt>ActiveRecord::Relation</tt>
|
935
|
+
|
936
|
+
|
937
|
+
|
938
|
+
|
939
|
+
|
940
|
+
</h3><div class="docstring">
|
941
|
+
<div class="discussion">
|
942
|
+
|
943
|
+
<p>Scopes workflow steps by their current state using state machine transitions</p>
|
944
|
+
|
945
|
+
|
946
|
+
</div>
|
947
|
+
</div>
|
948
|
+
<div class="tags">
|
949
|
+
<p class="tag_title">Parameters:</p>
|
950
|
+
<ul class="param">
|
951
|
+
|
952
|
+
<li>
|
953
|
+
|
954
|
+
<span class='name'>state</span>
|
955
|
+
|
956
|
+
|
957
|
+
<span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
|
958
|
+
|
959
|
+
|
960
|
+
|
961
|
+
—
|
962
|
+
<div class='inline'>
|
963
|
+
<p>The state to filter by. If nil, returns all steps with current state information</p>
|
964
|
+
</div>
|
965
|
+
|
966
|
+
</li>
|
967
|
+
|
968
|
+
</ul>
|
969
|
+
|
970
|
+
<p class="tag_title">Returns:</p>
|
971
|
+
<ul class="return">
|
972
|
+
|
973
|
+
<li>
|
974
|
+
|
975
|
+
|
976
|
+
<span class='type'>(<tt>ActiveRecord::Relation</tt>)</span>
|
977
|
+
|
978
|
+
|
979
|
+
|
980
|
+
—
|
981
|
+
<div class='inline'>
|
982
|
+
<p>Steps with current state, optionally filtered by specific state</p>
|
983
|
+
</div>
|
984
|
+
|
985
|
+
</li>
|
986
|
+
|
987
|
+
</ul>
|
988
|
+
|
989
|
+
</div><table class="source_code">
|
990
|
+
<tr>
|
991
|
+
<td>
|
992
|
+
<pre class="lines">
|
993
|
+
|
994
|
+
|
995
|
+
88
|
996
|
+
89
|
997
|
+
90
|
998
|
+
91
|
999
|
+
92
|
1000
|
+
93
|
1001
|
+
94
|
1002
|
+
95
|
1003
|
+
96
|
1004
|
+
97
|
1005
|
+
98
|
1006
|
+
99
|
1007
|
+
100
|
1008
|
+
101
|
1009
|
+
102
|
1010
|
+
103</pre>
|
1011
|
+
</td>
|
1012
|
+
<td>
|
1013
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 88</span>
|
1014
|
+
|
1015
|
+
<span class='id identifier rubyid_scope'>scope</span> <span class='symbol'>:by_current_state</span><span class='comma'>,</span> <span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_state'>state</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='op'>|</span>
|
1016
|
+
<span class='id identifier rubyid_relation'>relation</span> <span class='op'>=</span> <span class='id identifier rubyid_joins'>joins</span><span class='lparen'>(</span><span class='heredoc_beg'><<-SQL</span><span class='period'>.</span><span class='id identifier rubyid_squish'>squish</span><span class='rparen'>)</span>
|
1017
|
+
<span class='tstring_content'> INNER JOIN (
|
1018
|
+
SELECT DISTINCT ON (workflow_step_id) workflow_step_id, to_state
|
1019
|
+
FROM tasker_workflow_step_transitions
|
1020
|
+
WHERE most_recent = true
|
1021
|
+
ORDER BY workflow_step_id, sort_key DESC
|
1022
|
+
) current_transitions ON current_transitions.workflow_step_id = tasker_workflow_steps.workflow_step_id
|
1023
|
+
</span><span class='heredoc_end'> SQL
|
1024
|
+
</span>
|
1025
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_state'>state</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
1026
|
+
<span class='id identifier rubyid_relation'>relation</span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>current_transitions:</span> <span class='lbrace'>{</span> <span class='label'>to_state:</span> <span class='id identifier rubyid_state'>state</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
|
1027
|
+
<span class='kw'>else</span>
|
1028
|
+
<span class='id identifier rubyid_relation'>relation</span>
|
1029
|
+
<span class='kw'>end</span>
|
1030
|
+
<span class='rbrace'>}</span></pre>
|
1031
|
+
</td>
|
1032
|
+
</tr>
|
1033
|
+
</table>
|
1034
|
+
</div>
|
1035
|
+
|
1036
|
+
<div class="method_details ">
|
1037
|
+
<h3 class="signature " id="completed_since-class_method">
|
1038
|
+
|
1039
|
+
.<strong>completed_since</strong> ⇒ <tt>ActiveRecord::Relation</tt>
|
1040
|
+
|
1041
|
+
|
1042
|
+
|
1043
|
+
|
1044
|
+
|
1045
|
+
</h3><div class="docstring">
|
1046
|
+
<div class="discussion">
|
1047
|
+
|
1048
|
+
<p>Scopes workflow steps completed since a specific time</p>
|
1049
|
+
|
1050
|
+
|
1051
|
+
</div>
|
1052
|
+
</div>
|
1053
|
+
<div class="tags">
|
1054
|
+
<p class="tag_title">Parameters:</p>
|
1055
|
+
<ul class="param">
|
1056
|
+
|
1057
|
+
<li>
|
1058
|
+
|
1059
|
+
<span class='name'>since_time</span>
|
1060
|
+
|
1061
|
+
|
1062
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
1063
|
+
|
1064
|
+
|
1065
|
+
|
1066
|
+
—
|
1067
|
+
<div class='inline'>
|
1068
|
+
<p>The earliest completion time to include</p>
|
1069
|
+
</div>
|
1070
|
+
|
1071
|
+
</li>
|
1072
|
+
|
1073
|
+
</ul>
|
1074
|
+
|
1075
|
+
<p class="tag_title">Returns:</p>
|
1076
|
+
<ul class="return">
|
1077
|
+
|
1078
|
+
<li>
|
1079
|
+
|
1080
|
+
|
1081
|
+
<span class='type'>(<tt>ActiveRecord::Relation</tt>)</span>
|
1082
|
+
|
1083
|
+
|
1084
|
+
|
1085
|
+
—
|
1086
|
+
<div class='inline'>
|
1087
|
+
<p>Steps completed since the specified time</p>
|
1088
|
+
</div>
|
1089
|
+
|
1090
|
+
</li>
|
1091
|
+
|
1092
|
+
</ul>
|
1093
|
+
|
1094
|
+
</div><table class="source_code">
|
1095
|
+
<tr>
|
1096
|
+
<td>
|
1097
|
+
<pre class="lines">
|
1098
|
+
|
1099
|
+
|
1100
|
+
110
|
1101
|
+
111
|
1102
|
+
112
|
1103
|
+
113
|
1104
|
+
114</pre>
|
1105
|
+
</td>
|
1106
|
+
<td>
|
1107
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 110</span>
|
1108
|
+
|
1109
|
+
<span class='id identifier rubyid_scope'>scope</span> <span class='symbol'>:completed_since</span><span class='comma'>,</span> <span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_since_time'>since_time</span><span class='op'>|</span>
|
1110
|
+
<span class='id identifier rubyid_joins'>joins</span><span class='lparen'>(</span><span class='symbol'>:workflow_step_transitions</span><span class='rparen'>)</span>
|
1111
|
+
<span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tasker_workflow_step_transitions.most_recent = ? AND tasker_workflow_step_transitions.to_state = ?</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>complete</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1112
|
+
<span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tasker_workflow_step_transitions.created_at > ?</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_since_time'>since_time</span><span class='rparen'>)</span>
|
1113
|
+
<span class='rbrace'>}</span></pre>
|
1114
|
+
</td>
|
1115
|
+
</tr>
|
1116
|
+
</table>
|
1117
|
+
</div>
|
1118
|
+
|
1119
|
+
<div class="method_details ">
|
1120
|
+
<h3 class="signature " id="failed_since-class_method">
|
1121
|
+
|
1122
|
+
.<strong>failed_since</strong> ⇒ <tt>ActiveRecord::Relation</tt>
|
1123
|
+
|
1124
|
+
|
1125
|
+
|
1126
|
+
|
1127
|
+
|
1128
|
+
</h3><div class="docstring">
|
1129
|
+
<div class="discussion">
|
1130
|
+
|
1131
|
+
<p>Scopes workflow steps that failed since a specific time</p>
|
1132
|
+
|
1133
|
+
|
1134
|
+
</div>
|
1135
|
+
</div>
|
1136
|
+
<div class="tags">
|
1137
|
+
<p class="tag_title">Parameters:</p>
|
1138
|
+
<ul class="param">
|
1139
|
+
|
1140
|
+
<li>
|
1141
|
+
|
1142
|
+
<span class='name'>since_time</span>
|
1143
|
+
|
1144
|
+
|
1145
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
1146
|
+
|
1147
|
+
|
1148
|
+
|
1149
|
+
—
|
1150
|
+
<div class='inline'>
|
1151
|
+
<p>The earliest failure time to include</p>
|
1152
|
+
</div>
|
1153
|
+
|
1154
|
+
</li>
|
1155
|
+
|
1156
|
+
</ul>
|
1157
|
+
|
1158
|
+
<p class="tag_title">Returns:</p>
|
1159
|
+
<ul class="return">
|
1160
|
+
|
1161
|
+
<li>
|
1162
|
+
|
1163
|
+
|
1164
|
+
<span class='type'>(<tt>ActiveRecord::Relation</tt>)</span>
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
—
|
1169
|
+
<div class='inline'>
|
1170
|
+
<p>Steps that failed since the specified time</p>
|
1171
|
+
</div>
|
1172
|
+
|
1173
|
+
</li>
|
1174
|
+
|
1175
|
+
</ul>
|
1176
|
+
|
1177
|
+
</div><table class="source_code">
|
1178
|
+
<tr>
|
1179
|
+
<td>
|
1180
|
+
<pre class="lines">
|
1181
|
+
|
1182
|
+
|
1183
|
+
121
|
1184
|
+
122
|
1185
|
+
123
|
1186
|
+
124
|
1187
|
+
125</pre>
|
1188
|
+
</td>
|
1189
|
+
<td>
|
1190
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 121</span>
|
1191
|
+
|
1192
|
+
<span class='id identifier rubyid_scope'>scope</span> <span class='symbol'>:failed_since</span><span class='comma'>,</span> <span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_since_time'>since_time</span><span class='op'>|</span>
|
1193
|
+
<span class='id identifier rubyid_joins'>joins</span><span class='lparen'>(</span><span class='symbol'>:workflow_step_transitions</span><span class='rparen'>)</span>
|
1194
|
+
<span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tasker_workflow_step_transitions.most_recent = ? AND tasker_workflow_step_transitions.to_state = ?</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>error</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1195
|
+
<span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tasker_workflow_step_transitions.created_at > ?</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_since_time'>since_time</span><span class='rparen'>)</span>
|
1196
|
+
<span class='rbrace'>}</span></pre>
|
1197
|
+
</td>
|
1198
|
+
</tr>
|
1199
|
+
</table>
|
1200
|
+
</div>
|
1201
|
+
|
1202
|
+
<div class="method_details ">
|
1203
|
+
<h3 class="signature " id="find_step_by_name-class_method">
|
1204
|
+
|
1205
|
+
.<strong>find_step_by_name</strong>(steps, name) ⇒ <tt><span class='object_link'><a href="" title="Tasker::WorkflowStep (class)">WorkflowStep</a></span></tt><sup>?</sup>
|
1206
|
+
|
1207
|
+
|
1208
|
+
|
1209
|
+
|
1210
|
+
|
1211
|
+
</h3><div class="docstring">
|
1212
|
+
<div class="discussion">
|
1213
|
+
|
1214
|
+
<p>Finds a WorkflowStep with the given name by traversing the DAG efficiently</p>
|
1215
|
+
|
1216
|
+
|
1217
|
+
</div>
|
1218
|
+
</div>
|
1219
|
+
<div class="tags">
|
1220
|
+
<p class="tag_title">Parameters:</p>
|
1221
|
+
<ul class="param">
|
1222
|
+
|
1223
|
+
<li>
|
1224
|
+
|
1225
|
+
<span class='name'>steps</span>
|
1226
|
+
|
1227
|
+
|
1228
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="" title="Tasker::WorkflowStep (class)">WorkflowStep</a></span>></tt>)</span>
|
1229
|
+
|
1230
|
+
|
1231
|
+
|
1232
|
+
—
|
1233
|
+
<div class='inline'>
|
1234
|
+
<p>Collection of steps to search through</p>
|
1235
|
+
</div>
|
1236
|
+
|
1237
|
+
</li>
|
1238
|
+
|
1239
|
+
<li>
|
1240
|
+
|
1241
|
+
<span class='name'>name</span>
|
1242
|
+
|
1243
|
+
|
1244
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1245
|
+
|
1246
|
+
|
1247
|
+
|
1248
|
+
—
|
1249
|
+
<div class='inline'>
|
1250
|
+
<p>Name of the step to find</p>
|
1251
|
+
</div>
|
1252
|
+
|
1253
|
+
</li>
|
1254
|
+
|
1255
|
+
</ul>
|
1256
|
+
|
1257
|
+
<p class="tag_title">Returns:</p>
|
1258
|
+
<ul class="return">
|
1259
|
+
|
1260
|
+
<li>
|
1261
|
+
|
1262
|
+
|
1263
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Tasker::WorkflowStep (class)">WorkflowStep</a></span></tt>, <tt>nil</tt>)</span>
|
1264
|
+
|
1265
|
+
|
1266
|
+
|
1267
|
+
—
|
1268
|
+
<div class='inline'>
|
1269
|
+
<p>The first matching step found or nil if none exists</p>
|
1270
|
+
</div>
|
1271
|
+
|
1272
|
+
</li>
|
1273
|
+
|
1274
|
+
</ul>
|
1275
|
+
|
1276
|
+
</div><table class="source_code">
|
1277
|
+
<tr>
|
1278
|
+
<td>
|
1279
|
+
<pre class="lines">
|
1280
|
+
|
1281
|
+
|
1282
|
+
195
|
1283
|
+
196
|
1284
|
+
197</pre>
|
1285
|
+
</td>
|
1286
|
+
<td>
|
1287
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 195</span>
|
1288
|
+
|
1289
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_find_step_by_name'>find_step_by_name</span><span class='lparen'>(</span><span class='id identifier rubyid_steps'>steps</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
1290
|
+
<span class='const'><span class='object_link'><a href="WorkflowStep/StepFinder.html" title="Tasker::WorkflowStep::StepFinder (class)">StepFinder</a></span></span><span class='period'>.</span><span class='id identifier rubyid_find_by_name'><span class='object_link'><a href="WorkflowStep/StepFinder.html#find_by_name-class_method" title="Tasker::WorkflowStep::StepFinder.find_by_name (method)">find_by_name</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_steps'>steps</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
1291
|
+
<span class='kw'>end</span></pre>
|
1292
|
+
</td>
|
1293
|
+
</tr>
|
1294
|
+
</table>
|
1295
|
+
</div>
|
1296
|
+
|
1297
|
+
<div class="method_details ">
|
1298
|
+
<h3 class="signature " id="for_tasks_since-class_method">
|
1299
|
+
|
1300
|
+
.<strong>for_tasks_since</strong> ⇒ <tt>ActiveRecord::Relation</tt>
|
1301
|
+
|
1302
|
+
|
1303
|
+
|
1304
|
+
|
1305
|
+
|
1306
|
+
</h3><div class="docstring">
|
1307
|
+
<div class="discussion">
|
1308
|
+
|
1309
|
+
<p>Scopes workflow steps for tasks created since a specific time</p>
|
1310
|
+
|
1311
|
+
|
1312
|
+
</div>
|
1313
|
+
</div>
|
1314
|
+
<div class="tags">
|
1315
|
+
<p class="tag_title">Parameters:</p>
|
1316
|
+
<ul class="param">
|
1317
|
+
|
1318
|
+
<li>
|
1319
|
+
|
1320
|
+
<span class='name'>since_time</span>
|
1321
|
+
|
1322
|
+
|
1323
|
+
<span class='type'>(<tt>Time</tt>)</span>
|
1324
|
+
|
1325
|
+
|
1326
|
+
|
1327
|
+
—
|
1328
|
+
<div class='inline'>
|
1329
|
+
<p>The earliest task creation time to include</p>
|
1330
|
+
</div>
|
1331
|
+
|
1332
|
+
</li>
|
1333
|
+
|
1334
|
+
</ul>
|
1335
|
+
|
1336
|
+
<p class="tag_title">Returns:</p>
|
1337
|
+
<ul class="return">
|
1338
|
+
|
1339
|
+
<li>
|
1340
|
+
|
1341
|
+
|
1342
|
+
<span class='type'>(<tt>ActiveRecord::Relation</tt>)</span>
|
1343
|
+
|
1344
|
+
|
1345
|
+
|
1346
|
+
—
|
1347
|
+
<div class='inline'>
|
1348
|
+
<p>Steps for tasks created since the specified time</p>
|
1349
|
+
</div>
|
1350
|
+
|
1351
|
+
</li>
|
1352
|
+
|
1353
|
+
</ul>
|
1354
|
+
|
1355
|
+
</div><table class="source_code">
|
1356
|
+
<tr>
|
1357
|
+
<td>
|
1358
|
+
<pre class="lines">
|
1359
|
+
|
1360
|
+
|
1361
|
+
132
|
1362
|
+
133
|
1363
|
+
134</pre>
|
1364
|
+
</td>
|
1365
|
+
<td>
|
1366
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 132</span>
|
1367
|
+
|
1368
|
+
<span class='id identifier rubyid_scope'>scope</span> <span class='symbol'>:for_tasks_since</span><span class='comma'>,</span> <span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_since_time'>since_time</span><span class='op'>|</span>
|
1369
|
+
<span class='id identifier rubyid_joins'>joins</span><span class='lparen'>(</span><span class='symbol'>:task</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tasker_tasks.created_at > ?</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_since_time'>since_time</span><span class='rparen'>)</span>
|
1370
|
+
<span class='rbrace'>}</span></pre>
|
1371
|
+
</td>
|
1372
|
+
</tr>
|
1373
|
+
</table>
|
1374
|
+
</div>
|
1375
|
+
|
1376
|
+
<div class="method_details ">
|
1377
|
+
<h3 class="signature " id="get_steps_for_task-class_method">
|
1378
|
+
|
1379
|
+
.<strong>get_steps_for_task</strong>(task, templates) ⇒ <tt>Object</tt>
|
1380
|
+
|
1381
|
+
|
1382
|
+
|
1383
|
+
|
1384
|
+
|
1385
|
+
</h3><table class="source_code">
|
1386
|
+
<tr>
|
1387
|
+
<td>
|
1388
|
+
<pre class="lines">
|
1389
|
+
|
1390
|
+
|
1391
|
+
272
|
1392
|
+
273
|
1393
|
+
274
|
1394
|
+
275
|
1395
|
+
276
|
1396
|
+
277
|
1397
|
+
278
|
1398
|
+
279
|
1399
|
+
280
|
1400
|
+
281
|
1401
|
+
282
|
1402
|
+
283</pre>
|
1403
|
+
</td>
|
1404
|
+
<td>
|
1405
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 272</span>
|
1406
|
+
|
1407
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_steps_for_task'>get_steps_for_task</span><span class='lparen'>(</span><span class='id identifier rubyid_task'>task</span><span class='comma'>,</span> <span class='id identifier rubyid_templates'>templates</span><span class='rparen'>)</span>
|
1408
|
+
<span class='id identifier rubyid_named_steps'>named_steps</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="NamedStep.html" title="Tasker::NamedStep (class)">NamedStep</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create_named_steps_from_templates'><span class='object_link'><a href="NamedStep.html#create_named_steps_from_templates-class_method" title="Tasker::NamedStep.create_named_steps_from_templates (method)">create_named_steps_from_templates</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_templates'>templates</span><span class='rparen'>)</span>
|
1409
|
+
<span class='id identifier rubyid_steps'>steps</span> <span class='op'>=</span>
|
1410
|
+
<span class='id identifier rubyid_templates'>templates</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_template'>template</span><span class='op'>|</span>
|
1411
|
+
<span class='id identifier rubyid_named_step'>named_step</span> <span class='op'>=</span> <span class='id identifier rubyid_named_steps'>named_steps</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_ns'>ns</span><span class='op'>|</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='id identifier rubyid_ns'>ns</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='rbrace'>}</span>
|
1412
|
+
<span class='const'><span class='object_link'><a href="NamedTasksNamedStep.html" title="Tasker::NamedTasksNamedStep (class)">NamedTasksNamedStep</a></span></span><span class='period'>.</span><span class='id identifier rubyid_associate_named_step_with_named_task'><span class='object_link'><a href="NamedTasksNamedStep.html#associate_named_step_with_named_task-class_method" title="Tasker::NamedTasksNamedStep.associate_named_step_with_named_task (method)">associate_named_step_with_named_task</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_named_task'>named_task</span><span class='comma'>,</span> <span class='id identifier rubyid_template'>template</span><span class='comma'>,</span> <span class='id identifier rubyid_named_step'>named_step</span><span class='rparen'>)</span>
|
1413
|
+
<span class='id identifier rubyid_step'>step</span> <span class='op'>=</span> <span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>task_id:</span> <span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_task_id'>task_id</span><span class='comma'>,</span> <span class='label'>named_step_id:</span> <span class='id identifier rubyid_named_step'>named_step</span><span class='period'>.</span><span class='id identifier rubyid_named_step_id'>named_step_id</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
1414
|
+
<span class='id identifier rubyid_step'>step</span> <span class='op'>||=</span> <span class='id identifier rubyid_build_default_step!'>build_default_step!</span><span class='lparen'>(</span><span class='id identifier rubyid_task'>task</span><span class='comma'>,</span> <span class='id identifier rubyid_template'>template</span><span class='comma'>,</span> <span class='id identifier rubyid_named_step'>named_step</span><span class='rparen'>)</span>
|
1415
|
+
<span class='id identifier rubyid_step'>step</span>
|
1416
|
+
<span class='kw'>end</span>
|
1417
|
+
<span class='id identifier rubyid_set_up_dependent_steps'>set_up_dependent_steps</span><span class='lparen'>(</span><span class='id identifier rubyid_steps'>steps</span><span class='comma'>,</span> <span class='id identifier rubyid_templates'>templates</span><span class='rparen'>)</span>
|
1418
|
+
<span class='kw'>end</span></pre>
|
1419
|
+
</td>
|
1420
|
+
</tr>
|
1421
|
+
</table>
|
1422
|
+
</div>
|
1423
|
+
|
1424
|
+
<div class="method_details ">
|
1425
|
+
<h3 class="signature " id="get_viable_steps-class_method">
|
1426
|
+
|
1427
|
+
.<strong>get_viable_steps</strong>(task, sequence) ⇒ <tt>Object</tt>
|
1428
|
+
|
1429
|
+
|
1430
|
+
|
1431
|
+
|
1432
|
+
|
1433
|
+
</h3><table class="source_code">
|
1434
|
+
<tr>
|
1435
|
+
<td>
|
1436
|
+
<pre class="lines">
|
1437
|
+
|
1438
|
+
|
1439
|
+
326
|
1440
|
+
327
|
1441
|
+
328
|
1442
|
+
329
|
1443
|
+
330
|
1444
|
+
331
|
1445
|
+
332
|
1446
|
+
333
|
1447
|
+
334
|
1448
|
+
335
|
1449
|
+
336
|
1450
|
+
337</pre>
|
1451
|
+
</td>
|
1452
|
+
<td>
|
1453
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 326</span>
|
1454
|
+
|
1455
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_viable_steps'>get_viable_steps</span><span class='lparen'>(</span><span class='id identifier rubyid_task'>task</span><span class='comma'>,</span> <span class='id identifier rubyid_sequence'>sequence</span><span class='rparen'>)</span>
|
1456
|
+
<span class='comment'># Get step IDs from sequence
|
1457
|
+
</span> <span class='id identifier rubyid_step_ids'>step_ids</span> <span class='op'>=</span> <span class='id identifier rubyid_sequence'>sequence</span><span class='period'>.</span><span class='id identifier rubyid_steps'>steps</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:workflow_step_id</span><span class='rparen'>)</span>
|
1458
|
+
|
1459
|
+
<span class='comment'># Use function-based approach for high-performance readiness checking
|
1460
|
+
</span> <span class='id identifier rubyid_ready_statuses'>ready_statuses</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="StepReadinessStatus.html" title="Tasker::StepReadinessStatus (class)">StepReadinessStatus</a></span></span><span class='period'>.</span><span class='id identifier rubyid_for_task'><span class='object_link'><a href="StepReadinessStatus.html#for_task-class_method" title="Tasker::StepReadinessStatus.for_task (method)">for_task</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_task'>task</span><span class='period'>.</span><span class='id identifier rubyid_task_id'>task_id</span><span class='comma'>,</span> <span class='id identifier rubyid_step_ids'>step_ids</span><span class='rparen'>)</span>
|
1461
|
+
<span class='id identifier rubyid_ready_step_ids'>ready_step_ids</span> <span class='op'>=</span> <span class='id identifier rubyid_ready_statuses'>ready_statuses</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:ready_for_execution</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:workflow_step_id</span><span class='rparen'>)</span>
|
1462
|
+
|
1463
|
+
<span class='comment'># Return WorkflowStep objects for ready steps
|
1464
|
+
</span> <span class='const'><span class='object_link'><a href="" title="Tasker::WorkflowStep (class)">WorkflowStep</a></span></span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>workflow_step_id:</span> <span class='id identifier rubyid_ready_step_ids'>ready_step_ids</span><span class='rparen'>)</span>
|
1465
|
+
<span class='period'>.</span><span class='id identifier rubyid_includes'>includes</span><span class='lparen'>(</span><span class='symbol'>:named_step</span><span class='rparen'>)</span>
|
1466
|
+
<span class='kw'>end</span></pre>
|
1467
|
+
</td>
|
1468
|
+
</tr>
|
1469
|
+
</table>
|
1470
|
+
</div>
|
1471
|
+
|
1472
|
+
<div class="method_details ">
|
1473
|
+
<h3 class="signature " id="set_up_dependent_steps-class_method">
|
1474
|
+
|
1475
|
+
.<strong>set_up_dependent_steps</strong>(steps, templates) ⇒ <tt>Object</tt>
|
1476
|
+
|
1477
|
+
|
1478
|
+
|
1479
|
+
|
1480
|
+
|
1481
|
+
</h3><table class="source_code">
|
1482
|
+
<tr>
|
1483
|
+
<td>
|
1484
|
+
<pre class="lines">
|
1485
|
+
|
1486
|
+
|
1487
|
+
285
|
1488
|
+
286
|
1489
|
+
287
|
1490
|
+
288
|
1491
|
+
289
|
1492
|
+
290
|
1493
|
+
291
|
1494
|
+
292
|
1495
|
+
293
|
1496
|
+
294
|
1497
|
+
295
|
1498
|
+
296
|
1499
|
+
297
|
1500
|
+
298</pre>
|
1501
|
+
</td>
|
1502
|
+
<td>
|
1503
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 285</span>
|
1504
|
+
|
1505
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_set_up_dependent_steps'>set_up_dependent_steps</span><span class='lparen'>(</span><span class='id identifier rubyid_steps'>steps</span><span class='comma'>,</span> <span class='id identifier rubyid_templates'>templates</span><span class='rparen'>)</span>
|
1506
|
+
<span class='id identifier rubyid_templates'>templates</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_template'>template</span><span class='op'>|</span>
|
1507
|
+
<span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_all_dependencies'>all_dependencies</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
1508
|
+
|
1509
|
+
<span class='id identifier rubyid_dependent_step'>dependent_step</span> <span class='op'>=</span> <span class='id identifier rubyid_steps'>steps</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_step'>step</span><span class='op'>|</span> <span class='id identifier rubyid_step'>step</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='rbrace'>}</span>
|
1510
|
+
<span class='id identifier rubyid_template'>template</span><span class='period'>.</span><span class='id identifier rubyid_all_dependencies'>all_dependencies</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_dependency'>dependency</span><span class='op'>|</span>
|
1511
|
+
<span class='id identifier rubyid_provider_step'>provider_step</span> <span class='op'>=</span> <span class='id identifier rubyid_steps'>steps</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_step'>step</span><span class='op'>|</span> <span class='id identifier rubyid_step'>step</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='id identifier rubyid_dependency'>dependency</span> <span class='rbrace'>}</span>
|
1512
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_provider_step'>provider_step</span><span class='period'>.</span><span class='id identifier rubyid_outgoing_edges'>outgoing_edges</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='label'>to_step:</span> <span class='id identifier rubyid_dependent_step'>dependent_step</span><span class='rparen'>)</span>
|
1513
|
+
<span class='id identifier rubyid_provider_step'>provider_step</span><span class='period'>.</span><span class='id identifier rubyid_add_provides_edge!'>add_provides_edge!</span><span class='lparen'>(</span><span class='id identifier rubyid_dependent_step'>dependent_step</span><span class='rparen'>)</span>
|
1514
|
+
<span class='kw'>end</span>
|
1515
|
+
<span class='kw'>end</span>
|
1516
|
+
<span class='kw'>end</span>
|
1517
|
+
<span class='id identifier rubyid_steps'>steps</span>
|
1518
|
+
<span class='kw'>end</span></pre>
|
1519
|
+
</td>
|
1520
|
+
</tr>
|
1521
|
+
</table>
|
1522
|
+
</div>
|
1523
|
+
|
1524
|
+
<div class="method_details ">
|
1525
|
+
<h3 class="signature " id="task_completion_stats-class_method">
|
1526
|
+
|
1527
|
+
.<strong>task_completion_stats</strong>(task) ⇒ <tt>Hash</tt>
|
1528
|
+
|
1529
|
+
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
</h3><div class="docstring">
|
1534
|
+
<div class="discussion">
|
1535
|
+
|
1536
|
+
<p>Efficient method to get task completion statistics using ActiveRecord scopes This avoids the N+1 query problem while working with the state machine system</p>
|
1537
|
+
|
1538
|
+
|
1539
|
+
</div>
|
1540
|
+
</div>
|
1541
|
+
<div class="tags">
|
1542
|
+
<p class="tag_title">Parameters:</p>
|
1543
|
+
<ul class="param">
|
1544
|
+
|
1545
|
+
<li>
|
1546
|
+
|
1547
|
+
<span class='name'>task</span>
|
1548
|
+
|
1549
|
+
|
1550
|
+
<span class='type'>(<tt><span class='object_link'><a href="Task.html" title="Tasker::Task (class)">Task</a></span></tt>)</span>
|
1551
|
+
|
1552
|
+
|
1553
|
+
|
1554
|
+
—
|
1555
|
+
<div class='inline'>
|
1556
|
+
<p>The task to analyze</p>
|
1557
|
+
</div>
|
1558
|
+
|
1559
|
+
</li>
|
1560
|
+
|
1561
|
+
</ul>
|
1562
|
+
|
1563
|
+
<p class="tag_title">Returns:</p>
|
1564
|
+
<ul class="return">
|
1565
|
+
|
1566
|
+
<li>
|
1567
|
+
|
1568
|
+
|
1569
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
1570
|
+
|
1571
|
+
|
1572
|
+
|
1573
|
+
—
|
1574
|
+
<div class='inline'>
|
1575
|
+
<p>Hash with completion statistics and latest completion time</p>
|
1576
|
+
</div>
|
1577
|
+
|
1578
|
+
</li>
|
1579
|
+
|
1580
|
+
</ul>
|
1581
|
+
|
1582
|
+
</div><table class="source_code">
|
1583
|
+
<tr>
|
1584
|
+
<td>
|
1585
|
+
<pre class="lines">
|
1586
|
+
|
1587
|
+
|
1588
|
+
141
|
1589
|
+
142
|
1590
|
+
143
|
1591
|
+
144
|
1592
|
+
145
|
1593
|
+
146
|
1594
|
+
147
|
1595
|
+
148
|
1596
|
+
149
|
1597
|
+
150
|
1598
|
+
151
|
1599
|
+
152
|
1600
|
+
153
|
1601
|
+
154
|
1602
|
+
155
|
1603
|
+
156
|
1604
|
+
157
|
1605
|
+
158
|
1606
|
+
159
|
1607
|
+
160
|
1608
|
+
161
|
1609
|
+
162
|
1610
|
+
163
|
1611
|
+
164
|
1612
|
+
165
|
1613
|
+
166
|
1614
|
+
167
|
1615
|
+
168
|
1616
|
+
169</pre>
|
1617
|
+
</td>
|
1618
|
+
<td>
|
1619
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 141</span>
|
1620
|
+
|
1621
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_task_completion_stats'>task_completion_stats</span><span class='lparen'>(</span><span class='id identifier rubyid_task'>task</span><span class='rparen'>)</span>
|
1622
|
+
<span class='comment'># Use efficient ActiveRecord queries with the state machine
|
1623
|
+
</span> <span class='id identifier rubyid_task_steps'>task_steps</span> <span class='op'>=</span> <span class='id identifier rubyid_for_task'>for_task</span><span class='lparen'>(</span><span class='id identifier rubyid_task'>task</span><span class='rparen'>)</span>
|
1624
|
+
|
1625
|
+
<span class='comment'># Get completion statistics with optimized queries
|
1626
|
+
</span> <span class='id identifier rubyid_total_steps'>total_steps</span> <span class='op'>=</span> <span class='id identifier rubyid_task_steps'>task_steps</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span>
|
1627
|
+
<span class='id identifier rubyid_completed_steps'>completed_steps</span> <span class='op'>=</span> <span class='id identifier rubyid_task_steps'>task_steps</span><span class='period'>.</span><span class='id identifier rubyid_completed'>completed</span>
|
1628
|
+
<span class='id identifier rubyid_failed_steps'>failed_steps</span> <span class='op'>=</span> <span class='id identifier rubyid_task_steps'>task_steps</span><span class='period'>.</span><span class='id identifier rubyid_failed'>failed</span>
|
1629
|
+
|
1630
|
+
<span class='comment'># Calculate counts
|
1631
|
+
</span> <span class='id identifier rubyid_completed_count'>completed_count</span> <span class='op'>=</span> <span class='id identifier rubyid_completed_steps'>completed_steps</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span>
|
1632
|
+
<span class='id identifier rubyid_failed_count'>failed_count</span> <span class='op'>=</span> <span class='id identifier rubyid_failed_steps'>failed_steps</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span>
|
1633
|
+
|
1634
|
+
<span class='comment'># For pending count, calculate as total minus completed and failed
|
1635
|
+
</span> <span class='comment'># This handles the case where new steps don't have transitions yet
|
1636
|
+
</span> <span class='id identifier rubyid_pending_count'>pending_count</span> <span class='op'>=</span> <span class='id identifier rubyid_total_steps'>total_steps</span> <span class='op'>-</span> <span class='id identifier rubyid_completed_count'>completed_count</span> <span class='op'>-</span> <span class='id identifier rubyid_failed_count'>failed_count</span>
|
1637
|
+
|
1638
|
+
<span class='comment'># Get latest completion time from completed steps
|
1639
|
+
</span> <span class='id identifier rubyid_latest_completion_time'>latest_completion_time</span> <span class='op'>=</span> <span class='id identifier rubyid_completed_steps'>completed_steps</span><span class='period'>.</span><span class='id identifier rubyid_maximum'>maximum</span><span class='lparen'>(</span><span class='symbol'>:processed_at</span><span class='rparen'>)</span>
|
1640
|
+
|
1641
|
+
<span class='lbrace'>{</span>
|
1642
|
+
<span class='label'>total_steps:</span> <span class='id identifier rubyid_total_steps'>total_steps</span><span class='comma'>,</span>
|
1643
|
+
<span class='label'>completed_steps:</span> <span class='id identifier rubyid_completed_count'>completed_count</span><span class='comma'>,</span>
|
1644
|
+
<span class='label'>failed_steps:</span> <span class='id identifier rubyid_failed_count'>failed_count</span><span class='comma'>,</span>
|
1645
|
+
<span class='label'>pending_steps:</span> <span class='id identifier rubyid_pending_count'>pending_count</span><span class='comma'>,</span>
|
1646
|
+
<span class='label'>latest_completion_time:</span> <span class='id identifier rubyid_latest_completion_time'>latest_completion_time</span><span class='comma'>,</span>
|
1647
|
+
<span class='label'>all_complete:</span> <span class='id identifier rubyid_completed_count'>completed_count</span> <span class='op'>==</span> <span class='id identifier rubyid_total_steps'>total_steps</span> <span class='op'>&&</span> <span class='id identifier rubyid_total_steps'>total_steps</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1648
|
+
<span class='rbrace'>}</span>
|
1649
|
+
<span class='kw'>end</span></pre>
|
1650
|
+
</td>
|
1651
|
+
</tr>
|
1652
|
+
</table>
|
1653
|
+
</div>
|
1654
|
+
|
1655
|
+
</div>
|
1656
|
+
|
1657
|
+
<div id="instance_method_details" class="method_details_list">
|
1658
|
+
<h2>Instance Method Details</h2>
|
1659
|
+
|
1660
|
+
|
1661
|
+
<div class="method_details first">
|
1662
|
+
<h3 class="signature first" id="add_provides_edge!-instance_method">
|
1663
|
+
|
1664
|
+
#<strong>add_provides_edge!</strong>(to_step) ⇒ <tt>Object</tt>
|
1665
|
+
|
1666
|
+
|
1667
|
+
|
1668
|
+
|
1669
|
+
|
1670
|
+
</h3><table class="source_code">
|
1671
|
+
<tr>
|
1672
|
+
<td>
|
1673
|
+
<pre class="lines">
|
1674
|
+
|
1675
|
+
|
1676
|
+
339
|
1677
|
+
340
|
1678
|
+
341</pre>
|
1679
|
+
</td>
|
1680
|
+
<td>
|
1681
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 339</span>
|
1682
|
+
|
1683
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_provides_edge!'>add_provides_edge!</span><span class='lparen'>(</span><span class='id identifier rubyid_to_step'>to_step</span><span class='rparen'>)</span>
|
1684
|
+
<span class='id identifier rubyid_outgoing_edges'>outgoing_edges</span><span class='period'>.</span><span class='id identifier rubyid_create!'>create!</span><span class='lparen'>(</span><span class='label'>to_step:</span> <span class='id identifier rubyid_to_step'>to_step</span><span class='comma'>,</span> <span class='label'>name:</span> <span class='const'><span class='object_link'><a href="#PROVIDES_EDGE_NAME-constant" title="Tasker::WorkflowStep::PROVIDES_EDGE_NAME (constant)">PROVIDES_EDGE_NAME</a></span></span><span class='rparen'>)</span>
|
1685
|
+
<span class='kw'>end</span></pre>
|
1686
|
+
</td>
|
1687
|
+
</tr>
|
1688
|
+
</table>
|
1689
|
+
</div>
|
1690
|
+
|
1691
|
+
<div class="method_details ">
|
1692
|
+
<h3 class="signature " id="can_retry_now?-instance_method">
|
1693
|
+
|
1694
|
+
#<strong>can_retry_now?</strong> ⇒ <tt>Boolean</tt>
|
1695
|
+
|
1696
|
+
|
1697
|
+
|
1698
|
+
|
1699
|
+
|
1700
|
+
</h3><div class="docstring">
|
1701
|
+
<div class="discussion">
|
1702
|
+
|
1703
|
+
|
1704
|
+
</div>
|
1705
|
+
</div>
|
1706
|
+
<div class="tags">
|
1707
|
+
|
1708
|
+
<p class="tag_title">Returns:</p>
|
1709
|
+
<ul class="return">
|
1710
|
+
|
1711
|
+
<li>
|
1712
|
+
|
1713
|
+
|
1714
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1715
|
+
|
1716
|
+
|
1717
|
+
|
1718
|
+
</li>
|
1719
|
+
|
1720
|
+
</ul>
|
1721
|
+
|
1722
|
+
</div><table class="source_code">
|
1723
|
+
<tr>
|
1724
|
+
<td>
|
1725
|
+
<pre class="lines">
|
1726
|
+
|
1727
|
+
|
1728
|
+
420
|
1729
|
+
421
|
1730
|
+
422
|
1731
|
+
423
|
1732
|
+
424
|
1733
|
+
425
|
1734
|
+
426
|
1735
|
+
427</pre>
|
1736
|
+
</td>
|
1737
|
+
<td>
|
1738
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 420</span>
|
1739
|
+
|
1740
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_can_retry_now?'>can_retry_now?</span>
|
1741
|
+
<span class='comment'># Comprehensive check if step can be retried right now
|
1742
|
+
</span> <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_in_error?'>in_error?</span>
|
1743
|
+
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_retry_eligible?'>retry_eligible?</span>
|
1744
|
+
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_waiting_for_backoff?'>waiting_for_backoff?</span>
|
1745
|
+
|
1746
|
+
<span class='kw'>true</span>
|
1747
|
+
<span class='kw'>end</span></pre>
|
1748
|
+
</td>
|
1749
|
+
</tr>
|
1750
|
+
</table>
|
1751
|
+
</div>
|
1752
|
+
|
1753
|
+
<div class="method_details ">
|
1754
|
+
<h3 class="signature " id="cancelled?-instance_method">
|
1755
|
+
|
1756
|
+
#<strong>cancelled?</strong> ⇒ <tt>Boolean</tt>
|
1757
|
+
|
1758
|
+
|
1759
|
+
|
1760
|
+
|
1761
|
+
|
1762
|
+
</h3><div class="docstring">
|
1763
|
+
<div class="discussion">
|
1764
|
+
|
1765
|
+
|
1766
|
+
</div>
|
1767
|
+
</div>
|
1768
|
+
<div class="tags">
|
1769
|
+
|
1770
|
+
<p class="tag_title">Returns:</p>
|
1771
|
+
<ul class="return">
|
1772
|
+
|
1773
|
+
<li>
|
1774
|
+
|
1775
|
+
|
1776
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1777
|
+
|
1778
|
+
|
1779
|
+
|
1780
|
+
</li>
|
1781
|
+
|
1782
|
+
</ul>
|
1783
|
+
|
1784
|
+
</div><table class="source_code">
|
1785
|
+
<tr>
|
1786
|
+
<td>
|
1787
|
+
<pre class="lines">
|
1788
|
+
|
1789
|
+
|
1790
|
+
371
|
1791
|
+
372
|
1792
|
+
373
|
1793
|
+
374</pre>
|
1794
|
+
</td>
|
1795
|
+
<td>
|
1796
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 371</span>
|
1797
|
+
|
1798
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_cancelled?'>cancelled?</span>
|
1799
|
+
<span class='comment'># Use function-based approach for consistent state checking
|
1800
|
+
</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_current_state'>current_state</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="Constants.html" title="Tasker::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html" title="Tasker::Constants::WorkflowStepStatuses (module)">WorkflowStepStatuses</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html#CANCELLED-constant" title="Tasker::Constants::WorkflowStepStatuses::CANCELLED (constant)">CANCELLED</a></span></span>
|
1801
|
+
<span class='kw'>end</span></pre>
|
1802
|
+
</td>
|
1803
|
+
</tr>
|
1804
|
+
</table>
|
1805
|
+
</div>
|
1806
|
+
|
1807
|
+
<div class="method_details ">
|
1808
|
+
<h3 class="signature " id="complete?-instance_method">
|
1809
|
+
|
1810
|
+
#<strong>complete?</strong> ⇒ <tt>Boolean</tt>
|
1811
|
+
|
1812
|
+
|
1813
|
+
|
1814
|
+
|
1815
|
+
|
1816
|
+
</h3><div class="docstring">
|
1817
|
+
<div class="discussion">
|
1818
|
+
|
1819
|
+
|
1820
|
+
</div>
|
1821
|
+
</div>
|
1822
|
+
<div class="tags">
|
1823
|
+
|
1824
|
+
<p class="tag_title">Returns:</p>
|
1825
|
+
<ul class="return">
|
1826
|
+
|
1827
|
+
<li>
|
1828
|
+
|
1829
|
+
|
1830
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1831
|
+
|
1832
|
+
|
1833
|
+
|
1834
|
+
</li>
|
1835
|
+
|
1836
|
+
</ul>
|
1837
|
+
|
1838
|
+
</div><table class="source_code">
|
1839
|
+
<tr>
|
1840
|
+
<td>
|
1841
|
+
<pre class="lines">
|
1842
|
+
|
1843
|
+
|
1844
|
+
348
|
1845
|
+
349
|
1846
|
+
350
|
1847
|
+
351
|
1848
|
+
352
|
1849
|
+
353
|
1850
|
+
354</pre>
|
1851
|
+
</td>
|
1852
|
+
<td>
|
1853
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 348</span>
|
1854
|
+
|
1855
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_complete?'>complete?</span>
|
1856
|
+
<span class='comment'># Use function-based approach for consistent state checking
|
1857
|
+
</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_current_state'>current_state</span><span class='op'>&.</span><span class='id identifier rubyid_in?'>in?</span><span class='lparen'>(</span><span class='lbracket'>[</span>
|
1858
|
+
<span class='const'><span class='object_link'><a href="Constants.html" title="Tasker::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html" title="Tasker::Constants::WorkflowStepStatuses (module)">WorkflowStepStatuses</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html#COMPLETE-constant" title="Tasker::Constants::WorkflowStepStatuses::COMPLETE (constant)">COMPLETE</a></span></span><span class='comma'>,</span>
|
1859
|
+
<span class='const'><span class='object_link'><a href="Constants.html" title="Tasker::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html" title="Tasker::Constants::WorkflowStepStatuses (module)">WorkflowStepStatuses</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html#RESOLVED_MANUALLY-constant" title="Tasker::Constants::WorkflowStepStatuses::RESOLVED_MANUALLY (constant)">RESOLVED_MANUALLY</a></span></span>
|
1860
|
+
<span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>false</span>
|
1861
|
+
<span class='kw'>end</span></pre>
|
1862
|
+
</td>
|
1863
|
+
</tr>
|
1864
|
+
</table>
|
1865
|
+
</div>
|
1866
|
+
|
1867
|
+
<div class="method_details ">
|
1868
|
+
<h3 class="signature " id="dependencies_satisfied?-instance_method">
|
1869
|
+
|
1870
|
+
#<strong>dependencies_satisfied?</strong> ⇒ <tt>Boolean</tt>
|
1871
|
+
|
1872
|
+
|
1873
|
+
|
1874
|
+
|
1875
|
+
|
1876
|
+
</h3><div class="docstring">
|
1877
|
+
<div class="discussion">
|
1878
|
+
|
1879
|
+
<p>Function-based predicate methods</p>
|
1880
|
+
|
1881
|
+
|
1882
|
+
</div>
|
1883
|
+
</div>
|
1884
|
+
<div class="tags">
|
1885
|
+
|
1886
|
+
<p class="tag_title">Returns:</p>
|
1887
|
+
<ul class="return">
|
1888
|
+
|
1889
|
+
<li>
|
1890
|
+
|
1891
|
+
|
1892
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1893
|
+
|
1894
|
+
|
1895
|
+
|
1896
|
+
</li>
|
1897
|
+
|
1898
|
+
</ul>
|
1899
|
+
|
1900
|
+
</div><table class="source_code">
|
1901
|
+
<tr>
|
1902
|
+
<td>
|
1903
|
+
<pre class="lines">
|
1904
|
+
|
1905
|
+
|
1906
|
+
389
|
1907
|
+
390
|
1908
|
+
391
|
1909
|
+
392</pre>
|
1910
|
+
</td>
|
1911
|
+
<td>
|
1912
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 389</span>
|
1913
|
+
|
1914
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dependencies_satisfied?'>dependencies_satisfied?</span>
|
1915
|
+
<span class='comment'># Use function-based approach's pre-calculated dependency analysis
|
1916
|
+
</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_dependencies_satisfied'>dependencies_satisfied</span> <span class='op'>||</span> <span class='kw'>false</span>
|
1917
|
+
<span class='kw'>end</span></pre>
|
1918
|
+
</td>
|
1919
|
+
</tr>
|
1920
|
+
</table>
|
1921
|
+
</div>
|
1922
|
+
|
1923
|
+
<div class="method_details ">
|
1924
|
+
<h3 class="signature " id="has_retry_attempts?-instance_method">
|
1925
|
+
|
1926
|
+
#<strong>has_retry_attempts?</strong> ⇒ <tt>Boolean</tt>
|
1927
|
+
|
1928
|
+
|
1929
|
+
|
1930
|
+
|
1931
|
+
|
1932
|
+
</h3><div class="docstring">
|
1933
|
+
<div class="discussion">
|
1934
|
+
|
1935
|
+
|
1936
|
+
</div>
|
1937
|
+
</div>
|
1938
|
+
<div class="tags">
|
1939
|
+
|
1940
|
+
<p class="tag_title">Returns:</p>
|
1941
|
+
<ul class="return">
|
1942
|
+
|
1943
|
+
<li>
|
1944
|
+
|
1945
|
+
|
1946
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1947
|
+
|
1948
|
+
|
1949
|
+
|
1950
|
+
</li>
|
1951
|
+
|
1952
|
+
</ul>
|
1953
|
+
|
1954
|
+
</div><table class="source_code">
|
1955
|
+
<tr>
|
1956
|
+
<td>
|
1957
|
+
<pre class="lines">
|
1958
|
+
|
1959
|
+
|
1960
|
+
399
|
1961
|
+
400
|
1962
|
+
401
|
1963
|
+
402</pre>
|
1964
|
+
</td>
|
1965
|
+
<td>
|
1966
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 399</span>
|
1967
|
+
|
1968
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_has_retry_attempts?'>has_retry_attempts?</span>
|
1969
|
+
<span class='comment'># Check if step has made retry attempts
|
1970
|
+
</span> <span class='lparen'>(</span><span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_attempts'>attempts</span> <span class='op'>||</span> <span class='int'>0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1971
|
+
<span class='kw'>end</span></pre>
|
1972
|
+
</td>
|
1973
|
+
</tr>
|
1974
|
+
</table>
|
1975
|
+
</div>
|
1976
|
+
|
1977
|
+
<div class="method_details ">
|
1978
|
+
<h3 class="signature " id="in_error?-instance_method">
|
1979
|
+
|
1980
|
+
#<strong>in_error?</strong> ⇒ <tt>Boolean</tt>
|
1981
|
+
|
1982
|
+
|
1983
|
+
|
1984
|
+
|
1985
|
+
|
1986
|
+
</h3><div class="docstring">
|
1987
|
+
<div class="discussion">
|
1988
|
+
|
1989
|
+
|
1990
|
+
</div>
|
1991
|
+
</div>
|
1992
|
+
<div class="tags">
|
1993
|
+
|
1994
|
+
<p class="tag_title">Returns:</p>
|
1995
|
+
<ul class="return">
|
1996
|
+
|
1997
|
+
<li>
|
1998
|
+
|
1999
|
+
|
2000
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2001
|
+
|
2002
|
+
|
2003
|
+
|
2004
|
+
</li>
|
2005
|
+
|
2006
|
+
</ul>
|
2007
|
+
|
2008
|
+
</div><table class="source_code">
|
2009
|
+
<tr>
|
2010
|
+
<td>
|
2011
|
+
<pre class="lines">
|
2012
|
+
|
2013
|
+
|
2014
|
+
366
|
2015
|
+
367
|
2016
|
+
368
|
2017
|
+
369</pre>
|
2018
|
+
</td>
|
2019
|
+
<td>
|
2020
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 366</span>
|
2021
|
+
|
2022
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_in_error?'>in_error?</span>
|
2023
|
+
<span class='comment'># Use function-based approach for consistent state checking
|
2024
|
+
</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_current_state'>current_state</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="Constants.html" title="Tasker::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html" title="Tasker::Constants::WorkflowStepStatuses (module)">WorkflowStepStatuses</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html#ERROR-constant" title="Tasker::Constants::WorkflowStepStatuses::ERROR (constant)">ERROR</a></span></span>
|
2025
|
+
<span class='kw'>end</span></pre>
|
2026
|
+
</td>
|
2027
|
+
</tr>
|
2028
|
+
</table>
|
2029
|
+
</div>
|
2030
|
+
|
2031
|
+
<div class="method_details ">
|
2032
|
+
<h3 class="signature " id="in_progress?-instance_method">
|
2033
|
+
|
2034
|
+
#<strong>in_progress?</strong> ⇒ <tt>Boolean</tt>
|
2035
|
+
|
2036
|
+
|
2037
|
+
|
2038
|
+
|
2039
|
+
|
2040
|
+
</h3><div class="docstring">
|
2041
|
+
<div class="discussion">
|
2042
|
+
|
2043
|
+
|
2044
|
+
</div>
|
2045
|
+
</div>
|
2046
|
+
<div class="tags">
|
2047
|
+
|
2048
|
+
<p class="tag_title">Returns:</p>
|
2049
|
+
<ul class="return">
|
2050
|
+
|
2051
|
+
<li>
|
2052
|
+
|
2053
|
+
|
2054
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2055
|
+
|
2056
|
+
|
2057
|
+
|
2058
|
+
</li>
|
2059
|
+
|
2060
|
+
</ul>
|
2061
|
+
|
2062
|
+
</div><table class="source_code">
|
2063
|
+
<tr>
|
2064
|
+
<td>
|
2065
|
+
<pre class="lines">
|
2066
|
+
|
2067
|
+
|
2068
|
+
356
|
2069
|
+
357
|
2070
|
+
358
|
2071
|
+
359</pre>
|
2072
|
+
</td>
|
2073
|
+
<td>
|
2074
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 356</span>
|
2075
|
+
|
2076
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_in_progress?'>in_progress?</span>
|
2077
|
+
<span class='comment'># Use function-based approach for consistent state checking
|
2078
|
+
</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_current_state'>current_state</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="Constants.html" title="Tasker::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html" title="Tasker::Constants::WorkflowStepStatuses (module)">WorkflowStepStatuses</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html#IN_PROGRESS-constant" title="Tasker::Constants::WorkflowStepStatuses::IN_PROGRESS (constant)">IN_PROGRESS</a></span></span>
|
2079
|
+
<span class='kw'>end</span></pre>
|
2080
|
+
</td>
|
2081
|
+
</tr>
|
2082
|
+
</table>
|
2083
|
+
</div>
|
2084
|
+
|
2085
|
+
<div class="method_details ">
|
2086
|
+
<h3 class="signature " id="leaf_step?-instance_method">
|
2087
|
+
|
2088
|
+
#<strong>leaf_step?</strong> ⇒ <tt>Boolean</tt>
|
2089
|
+
|
2090
|
+
|
2091
|
+
|
2092
|
+
|
2093
|
+
|
2094
|
+
</h3><div class="docstring">
|
2095
|
+
<div class="discussion">
|
2096
|
+
|
2097
|
+
|
2098
|
+
</div>
|
2099
|
+
</div>
|
2100
|
+
<div class="tags">
|
2101
|
+
|
2102
|
+
<p class="tag_title">Returns:</p>
|
2103
|
+
<ul class="return">
|
2104
|
+
|
2105
|
+
<li>
|
2106
|
+
|
2107
|
+
|
2108
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2109
|
+
|
2110
|
+
|
2111
|
+
|
2112
|
+
</li>
|
2113
|
+
|
2114
|
+
</ul>
|
2115
|
+
|
2116
|
+
</div><table class="source_code">
|
2117
|
+
<tr>
|
2118
|
+
<td>
|
2119
|
+
<pre class="lines">
|
2120
|
+
|
2121
|
+
|
2122
|
+
434
|
2123
|
+
435
|
2124
|
+
436
|
2125
|
+
437</pre>
|
2126
|
+
</td>
|
2127
|
+
<td>
|
2128
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 434</span>
|
2129
|
+
|
2130
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_leaf_step?'>leaf_step?</span>
|
2131
|
+
<span class='comment'># Check if this is a leaf step using DAG relationship view
|
2132
|
+
</span> <span class='id identifier rubyid_step_dag_relationship'>step_dag_relationship</span><span class='op'>&.</span><span class='id identifier rubyid_child_count'>child_count</span><span class='op'>&.</span><span class='id identifier rubyid_zero?'>zero?</span>
|
2133
|
+
<span class='kw'>end</span></pre>
|
2134
|
+
</td>
|
2135
|
+
</tr>
|
2136
|
+
</table>
|
2137
|
+
</div>
|
2138
|
+
|
2139
|
+
<div class="method_details ">
|
2140
|
+
<h3 class="signature " id="pending?-instance_method">
|
2141
|
+
|
2142
|
+
#<strong>pending?</strong> ⇒ <tt>Boolean</tt>
|
2143
|
+
|
2144
|
+
|
2145
|
+
|
2146
|
+
|
2147
|
+
|
2148
|
+
</h3><div class="docstring">
|
2149
|
+
<div class="discussion">
|
2150
|
+
|
2151
|
+
|
2152
|
+
</div>
|
2153
|
+
</div>
|
2154
|
+
<div class="tags">
|
2155
|
+
|
2156
|
+
<p class="tag_title">Returns:</p>
|
2157
|
+
<ul class="return">
|
2158
|
+
|
2159
|
+
<li>
|
2160
|
+
|
2161
|
+
|
2162
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2163
|
+
|
2164
|
+
|
2165
|
+
|
2166
|
+
</li>
|
2167
|
+
|
2168
|
+
</ul>
|
2169
|
+
|
2170
|
+
</div><table class="source_code">
|
2171
|
+
<tr>
|
2172
|
+
<td>
|
2173
|
+
<pre class="lines">
|
2174
|
+
|
2175
|
+
|
2176
|
+
361
|
2177
|
+
362
|
2178
|
+
363
|
2179
|
+
364</pre>
|
2180
|
+
</td>
|
2181
|
+
<td>
|
2182
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 361</span>
|
2183
|
+
|
2184
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pending?'>pending?</span>
|
2185
|
+
<span class='comment'># Use function-based approach for consistent state checking
|
2186
|
+
</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_current_state'>current_state</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="Constants.html" title="Tasker::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html" title="Tasker::Constants::WorkflowStepStatuses (module)">WorkflowStepStatuses</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html#PENDING-constant" title="Tasker::Constants::WorkflowStepStatuses::PENDING (constant)">PENDING</a></span></span>
|
2187
|
+
<span class='kw'>end</span></pre>
|
2188
|
+
</td>
|
2189
|
+
</tr>
|
2190
|
+
</table>
|
2191
|
+
</div>
|
2192
|
+
|
2193
|
+
<div class="method_details ">
|
2194
|
+
<h3 class="signature " id="ready?-instance_method">
|
2195
|
+
|
2196
|
+
#<strong>ready?</strong> ⇒ <tt>Boolean</tt>
|
2197
|
+
|
2198
|
+
|
2199
|
+
|
2200
|
+
|
2201
|
+
|
2202
|
+
</h3><div class="docstring">
|
2203
|
+
<div class="discussion">
|
2204
|
+
|
2205
|
+
|
2206
|
+
</div>
|
2207
|
+
</div>
|
2208
|
+
<div class="tags">
|
2209
|
+
|
2210
|
+
<p class="tag_title">Returns:</p>
|
2211
|
+
<ul class="return">
|
2212
|
+
|
2213
|
+
<li>
|
2214
|
+
|
2215
|
+
|
2216
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2217
|
+
|
2218
|
+
|
2219
|
+
|
2220
|
+
</li>
|
2221
|
+
|
2222
|
+
</ul>
|
2223
|
+
|
2224
|
+
</div><table class="source_code">
|
2225
|
+
<tr>
|
2226
|
+
<td>
|
2227
|
+
<pre class="lines">
|
2228
|
+
|
2229
|
+
|
2230
|
+
383
|
2231
|
+
384
|
2232
|
+
385
|
2233
|
+
386</pre>
|
2234
|
+
</td>
|
2235
|
+
<td>
|
2236
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 383</span>
|
2237
|
+
|
2238
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ready?'>ready?</span>
|
2239
|
+
<span class='comment'># Use function-based approach's comprehensive readiness calculation
|
2240
|
+
</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_ready_for_execution'>ready_for_execution</span> <span class='op'>||</span> <span class='kw'>false</span>
|
2241
|
+
<span class='kw'>end</span></pre>
|
2242
|
+
</td>
|
2243
|
+
</tr>
|
2244
|
+
</table>
|
2245
|
+
</div>
|
2246
|
+
|
2247
|
+
<div class="method_details ">
|
2248
|
+
<h3 class="signature " id="ready_status?-instance_method">
|
2249
|
+
|
2250
|
+
#<strong>ready_status?</strong> ⇒ <tt>Boolean</tt>
|
2251
|
+
|
2252
|
+
|
2253
|
+
|
2254
|
+
|
2255
|
+
|
2256
|
+
</h3><div class="docstring">
|
2257
|
+
<div class="discussion">
|
2258
|
+
|
2259
|
+
|
2260
|
+
</div>
|
2261
|
+
</div>
|
2262
|
+
<div class="tags">
|
2263
|
+
|
2264
|
+
<p class="tag_title">Returns:</p>
|
2265
|
+
<ul class="return">
|
2266
|
+
|
2267
|
+
<li>
|
2268
|
+
|
2269
|
+
|
2270
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2271
|
+
|
2272
|
+
|
2273
|
+
|
2274
|
+
</li>
|
2275
|
+
|
2276
|
+
</ul>
|
2277
|
+
|
2278
|
+
</div><table class="source_code">
|
2279
|
+
<tr>
|
2280
|
+
<td>
|
2281
|
+
<pre class="lines">
|
2282
|
+
|
2283
|
+
|
2284
|
+
376
|
2285
|
+
377
|
2286
|
+
378
|
2287
|
+
379
|
2288
|
+
380
|
2289
|
+
381</pre>
|
2290
|
+
</td>
|
2291
|
+
<td>
|
2292
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 376</span>
|
2293
|
+
|
2294
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ready_status?'>ready_status?</span>
|
2295
|
+
<span class='comment'># Use function-based approach for efficient ready status checking
|
2296
|
+
</span> <span class='const'><span class='object_link'><a href="Constants.html" title="Tasker::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants.html#UNREADY_WORKFLOW_STEP_STATUSES-constant" title="Tasker::Constants::UNREADY_WORKFLOW_STEP_STATUSES (constant)">UNREADY_WORKFLOW_STEP_STATUSES</a></span></span><span class='period'>.</span><span class='id identifier rubyid_exclude?'>exclude?</span><span class='lparen'>(</span>
|
2297
|
+
<span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_current_state'>current_state</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="Constants.html" title="Tasker::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html" title="Tasker::Constants::WorkflowStepStatuses (module)">WorkflowStepStatuses</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html#PENDING-constant" title="Tasker::Constants::WorkflowStepStatuses::PENDING (constant)">PENDING</a></span></span>
|
2298
|
+
<span class='rparen'>)</span>
|
2299
|
+
<span class='kw'>end</span></pre>
|
2300
|
+
</td>
|
2301
|
+
</tr>
|
2302
|
+
</table>
|
2303
|
+
</div>
|
2304
|
+
|
2305
|
+
<div class="method_details ">
|
2306
|
+
<h3 class="signature " id="reload-instance_method">
|
2307
|
+
|
2308
|
+
#<strong>reload</strong> ⇒ <tt>Object</tt>
|
2309
|
+
|
2310
|
+
|
2311
|
+
|
2312
|
+
|
2313
|
+
|
2314
|
+
</h3><table class="source_code">
|
2315
|
+
<tr>
|
2316
|
+
<td>
|
2317
|
+
<pre class="lines">
|
2318
|
+
|
2319
|
+
|
2320
|
+
439
|
2321
|
+
440
|
2322
|
+
441
|
2323
|
+
442
|
2324
|
+
443
|
2325
|
+
444</pre>
|
2326
|
+
</td>
|
2327
|
+
<td>
|
2328
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 439</span>
|
2329
|
+
|
2330
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_reload'>reload</span>
|
2331
|
+
<span class='comment'># Override reload to ensure step readiness status is refreshed
|
2332
|
+
</span> <span class='kw'>super</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span>
|
2333
|
+
<span class='ivar'>@step_readiness_status</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='comment'># Reset cached readiness status
|
2334
|
+
</span> <span class='kw'>end</span>
|
2335
|
+
<span class='kw'>end</span></pre>
|
2336
|
+
</td>
|
2337
|
+
</tr>
|
2338
|
+
</table>
|
2339
|
+
</div>
|
2340
|
+
|
2341
|
+
<div class="method_details ">
|
2342
|
+
<h3 class="signature " id="retry_eligible?-instance_method">
|
2343
|
+
|
2344
|
+
#<strong>retry_eligible?</strong> ⇒ <tt>Boolean</tt>
|
2345
|
+
|
2346
|
+
|
2347
|
+
|
2348
|
+
|
2349
|
+
|
2350
|
+
</h3><div class="docstring">
|
2351
|
+
<div class="discussion">
|
2352
|
+
|
2353
|
+
|
2354
|
+
</div>
|
2355
|
+
</div>
|
2356
|
+
<div class="tags">
|
2357
|
+
|
2358
|
+
<p class="tag_title">Returns:</p>
|
2359
|
+
<ul class="return">
|
2360
|
+
|
2361
|
+
<li>
|
2362
|
+
|
2363
|
+
|
2364
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2365
|
+
|
2366
|
+
|
2367
|
+
|
2368
|
+
</li>
|
2369
|
+
|
2370
|
+
</ul>
|
2371
|
+
|
2372
|
+
</div><table class="source_code">
|
2373
|
+
<tr>
|
2374
|
+
<td>
|
2375
|
+
<pre class="lines">
|
2376
|
+
|
2377
|
+
|
2378
|
+
394
|
2379
|
+
395
|
2380
|
+
396
|
2381
|
+
397</pre>
|
2382
|
+
</td>
|
2383
|
+
<td>
|
2384
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 394</span>
|
2385
|
+
|
2386
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_retry_eligible?'>retry_eligible?</span>
|
2387
|
+
<span class='comment'># Use function-based approach's retry/backoff calculation
|
2388
|
+
</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_retry_eligible'>retry_eligible</span> <span class='op'>||</span> <span class='kw'>false</span>
|
2389
|
+
<span class='kw'>end</span></pre>
|
2390
|
+
</td>
|
2391
|
+
</tr>
|
2392
|
+
</table>
|
2393
|
+
</div>
|
2394
|
+
|
2395
|
+
<div class="method_details ">
|
2396
|
+
<h3 class="signature " id="retry_exhausted?-instance_method">
|
2397
|
+
|
2398
|
+
#<strong>retry_exhausted?</strong> ⇒ <tt>Boolean</tt>
|
2399
|
+
|
2400
|
+
|
2401
|
+
|
2402
|
+
|
2403
|
+
|
2404
|
+
</h3><div class="docstring">
|
2405
|
+
<div class="discussion">
|
2406
|
+
|
2407
|
+
|
2408
|
+
</div>
|
2409
|
+
</div>
|
2410
|
+
<div class="tags">
|
2411
|
+
|
2412
|
+
<p class="tag_title">Returns:</p>
|
2413
|
+
<ul class="return">
|
2414
|
+
|
2415
|
+
<li>
|
2416
|
+
|
2417
|
+
|
2418
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2419
|
+
|
2420
|
+
|
2421
|
+
|
2422
|
+
</li>
|
2423
|
+
|
2424
|
+
</ul>
|
2425
|
+
|
2426
|
+
</div><table class="source_code">
|
2427
|
+
<tr>
|
2428
|
+
<td>
|
2429
|
+
<pre class="lines">
|
2430
|
+
|
2431
|
+
|
2432
|
+
404
|
2433
|
+
405
|
2434
|
+
406
|
2435
|
+
407
|
2436
|
+
408
|
2437
|
+
409
|
2438
|
+
410
|
2439
|
+
411</pre>
|
2440
|
+
</td>
|
2441
|
+
<td>
|
2442
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 404</span>
|
2443
|
+
|
2444
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_retry_exhausted?'>retry_exhausted?</span>
|
2445
|
+
<span class='comment'># Check if step has exhausted retry attempts
|
2446
|
+
</span> <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span>
|
2447
|
+
|
2448
|
+
<span class='id identifier rubyid_attempts'>attempts</span> <span class='op'>=</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='period'>.</span><span class='id identifier rubyid_attempts'>attempts</span> <span class='op'>||</span> <span class='int'>0</span>
|
2449
|
+
<span class='id identifier rubyid_retry_limit'>retry_limit</span> <span class='op'>=</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='period'>.</span><span class='id identifier rubyid_retry_limit'>retry_limit</span> <span class='op'>||</span> <span class='int'>3</span>
|
2450
|
+
<span class='id identifier rubyid_attempts'>attempts</span> <span class='op'>>=</span> <span class='id identifier rubyid_retry_limit'>retry_limit</span>
|
2451
|
+
<span class='kw'>end</span></pre>
|
2452
|
+
</td>
|
2453
|
+
</tr>
|
2454
|
+
</table>
|
2455
|
+
</div>
|
2456
|
+
|
2457
|
+
<div class="method_details ">
|
2458
|
+
<h3 class="signature " id="root_step?-instance_method">
|
2459
|
+
|
2460
|
+
#<strong>root_step?</strong> ⇒ <tt>Boolean</tt>
|
2461
|
+
|
2462
|
+
|
2463
|
+
|
2464
|
+
|
2465
|
+
|
2466
|
+
</h3><div class="docstring">
|
2467
|
+
<div class="discussion">
|
2468
|
+
|
2469
|
+
|
2470
|
+
</div>
|
2471
|
+
</div>
|
2472
|
+
<div class="tags">
|
2473
|
+
|
2474
|
+
<p class="tag_title">Returns:</p>
|
2475
|
+
<ul class="return">
|
2476
|
+
|
2477
|
+
<li>
|
2478
|
+
|
2479
|
+
|
2480
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2481
|
+
|
2482
|
+
|
2483
|
+
|
2484
|
+
</li>
|
2485
|
+
|
2486
|
+
</ul>
|
2487
|
+
|
2488
|
+
</div><table class="source_code">
|
2489
|
+
<tr>
|
2490
|
+
<td>
|
2491
|
+
<pre class="lines">
|
2492
|
+
|
2493
|
+
|
2494
|
+
429
|
2495
|
+
430
|
2496
|
+
431
|
2497
|
+
432</pre>
|
2498
|
+
</td>
|
2499
|
+
<td>
|
2500
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 429</span>
|
2501
|
+
|
2502
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_root_step?'>root_step?</span>
|
2503
|
+
<span class='comment'># Check if this is a root step (no dependencies)
|
2504
|
+
</span> <span class='lparen'>(</span><span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_total_parents'>total_parents</span> <span class='op'>||</span> <span class='int'>0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span>
|
2505
|
+
<span class='kw'>end</span></pre>
|
2506
|
+
</td>
|
2507
|
+
</tr>
|
2508
|
+
</table>
|
2509
|
+
</div>
|
2510
|
+
|
2511
|
+
<div class="method_details ">
|
2512
|
+
<h3 class="signature " id="state_machine-instance_method">
|
2513
|
+
|
2514
|
+
#<strong>state_machine</strong> ⇒ <tt>Object</tt>
|
2515
|
+
|
2516
|
+
|
2517
|
+
|
2518
|
+
|
2519
|
+
|
2520
|
+
</h3><div class="docstring">
|
2521
|
+
<div class="discussion">
|
2522
|
+
|
2523
|
+
<p>State machine integration</p>
|
2524
|
+
|
2525
|
+
|
2526
|
+
</div>
|
2527
|
+
</div>
|
2528
|
+
<div class="tags">
|
2529
|
+
|
2530
|
+
|
2531
|
+
</div><table class="source_code">
|
2532
|
+
<tr>
|
2533
|
+
<td>
|
2534
|
+
<pre class="lines">
|
2535
|
+
|
2536
|
+
|
2537
|
+
172
|
2538
|
+
173
|
2539
|
+
174
|
2540
|
+
175
|
2541
|
+
176
|
2542
|
+
177
|
2543
|
+
178</pre>
|
2544
|
+
</td>
|
2545
|
+
<td>
|
2546
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 172</span>
|
2547
|
+
|
2548
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_state_machine'>state_machine</span>
|
2549
|
+
<span class='ivar'>@state_machine</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="StateMachine.html" title="Tasker::StateMachine (module)">StateMachine</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="StateMachine/StepStateMachine.html" title="Tasker::StateMachine::StepStateMachine (class)">StepStateMachine</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
2550
|
+
<span class='kw'>self</span><span class='comma'>,</span>
|
2551
|
+
<span class='label'>transition_class:</span> <span class='const'><span class='object_link'><a href="../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WorkflowStepTransition.html" title="Tasker::WorkflowStepTransition (class)">WorkflowStepTransition</a></span></span><span class='comma'>,</span>
|
2552
|
+
<span class='label'>association_name:</span> <span class='symbol'>:workflow_step_transitions</span>
|
2553
|
+
<span class='rparen'>)</span>
|
2554
|
+
<span class='kw'>end</span></pre>
|
2555
|
+
</td>
|
2556
|
+
</tr>
|
2557
|
+
</table>
|
2558
|
+
</div>
|
2559
|
+
|
2560
|
+
<div class="method_details ">
|
2561
|
+
<h3 class="signature " id="status-instance_method">
|
2562
|
+
|
2563
|
+
#<strong>status</strong> ⇒ <tt>Object</tt>
|
2564
|
+
|
2565
|
+
|
2566
|
+
|
2567
|
+
|
2568
|
+
|
2569
|
+
</h3><div class="docstring">
|
2570
|
+
<div class="discussion">
|
2571
|
+
|
2572
|
+
<p>Status is now entirely managed by the state machine</p>
|
2573
|
+
|
2574
|
+
|
2575
|
+
</div>
|
2576
|
+
</div>
|
2577
|
+
<div class="tags">
|
2578
|
+
|
2579
|
+
|
2580
|
+
</div><table class="source_code">
|
2581
|
+
<tr>
|
2582
|
+
<td>
|
2583
|
+
<pre class="lines">
|
2584
|
+
|
2585
|
+
|
2586
|
+
181
|
2587
|
+
182
|
2588
|
+
183
|
2589
|
+
184
|
2590
|
+
185
|
2591
|
+
186
|
2592
|
+
187
|
2593
|
+
188
|
2594
|
+
189</pre>
|
2595
|
+
</td>
|
2596
|
+
<td>
|
2597
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 181</span>
|
2598
|
+
|
2599
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span>
|
2600
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_new_record?'>new_record?</span>
|
2601
|
+
<span class='comment'># For new records, return the initial state
|
2602
|
+
</span> <span class='const'><span class='object_link'><a href="../Tasker.html" title="Tasker (module)">Tasker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants.html" title="Tasker::Constants (module)">Constants</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html" title="Tasker::Constants::WorkflowStepStatuses (module)">WorkflowStepStatuses</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Constants/WorkflowStepStatuses.html#PENDING-constant" title="Tasker::Constants::WorkflowStepStatuses::PENDING (constant)">PENDING</a></span></span>
|
2603
|
+
<span class='kw'>else</span>
|
2604
|
+
<span class='comment'># For persisted records, use state machine
|
2605
|
+
</span> <span class='id identifier rubyid_state_machine'>state_machine</span><span class='period'>.</span><span class='id identifier rubyid_current_state'>current_state</span>
|
2606
|
+
<span class='kw'>end</span>
|
2607
|
+
<span class='kw'>end</span></pre>
|
2608
|
+
</td>
|
2609
|
+
</tr>
|
2610
|
+
</table>
|
2611
|
+
</div>
|
2612
|
+
|
2613
|
+
<div class="method_details ">
|
2614
|
+
<h3 class="signature " id="step_readiness_status-instance_method">
|
2615
|
+
|
2616
|
+
#<strong>step_readiness_status</strong> ⇒ <tt>Object</tt>
|
2617
|
+
|
2618
|
+
|
2619
|
+
|
2620
|
+
|
2621
|
+
|
2622
|
+
</h3><div class="docstring">
|
2623
|
+
<div class="discussion">
|
2624
|
+
|
2625
|
+
<p>Helper method to get step readiness status using function-based approach</p>
|
2626
|
+
|
2627
|
+
|
2628
|
+
</div>
|
2629
|
+
</div>
|
2630
|
+
<div class="tags">
|
2631
|
+
|
2632
|
+
|
2633
|
+
</div><table class="source_code">
|
2634
|
+
<tr>
|
2635
|
+
<td>
|
2636
|
+
<pre class="lines">
|
2637
|
+
|
2638
|
+
|
2639
|
+
344
|
2640
|
+
345
|
2641
|
+
346</pre>
|
2642
|
+
</td>
|
2643
|
+
<td>
|
2644
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 344</span>
|
2645
|
+
|
2646
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span>
|
2647
|
+
<span class='ivar'>@step_readiness_status</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="StepReadinessStatus.html" title="Tasker::StepReadinessStatus (class)">StepReadinessStatus</a></span></span><span class='period'>.</span><span class='id identifier rubyid_for_task'><span class='object_link'><a href="StepReadinessStatus.html#for_task-class_method" title="Tasker::StepReadinessStatus.for_task (method)">for_task</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_task_id'>task_id</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_workflow_step_id'>workflow_step_id</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
2648
|
+
<span class='kw'>end</span></pre>
|
2649
|
+
</td>
|
2650
|
+
</tr>
|
2651
|
+
</table>
|
2652
|
+
</div>
|
2653
|
+
|
2654
|
+
<div class="method_details ">
|
2655
|
+
<h3 class="signature " id="waiting_for_backoff?-instance_method">
|
2656
|
+
|
2657
|
+
#<strong>waiting_for_backoff?</strong> ⇒ <tt>Boolean</tt>
|
2658
|
+
|
2659
|
+
|
2660
|
+
|
2661
|
+
|
2662
|
+
|
2663
|
+
</h3><div class="docstring">
|
2664
|
+
<div class="discussion">
|
2665
|
+
|
2666
|
+
|
2667
|
+
</div>
|
2668
|
+
</div>
|
2669
|
+
<div class="tags">
|
2670
|
+
|
2671
|
+
<p class="tag_title">Returns:</p>
|
2672
|
+
<ul class="return">
|
2673
|
+
|
2674
|
+
<li>
|
2675
|
+
|
2676
|
+
|
2677
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2678
|
+
|
2679
|
+
|
2680
|
+
|
2681
|
+
</li>
|
2682
|
+
|
2683
|
+
</ul>
|
2684
|
+
|
2685
|
+
</div><table class="source_code">
|
2686
|
+
<tr>
|
2687
|
+
<td>
|
2688
|
+
<pre class="lines">
|
2689
|
+
|
2690
|
+
|
2691
|
+
413
|
2692
|
+
414
|
2693
|
+
415
|
2694
|
+
416
|
2695
|
+
417
|
2696
|
+
418</pre>
|
2697
|
+
</td>
|
2698
|
+
<td>
|
2699
|
+
<pre class="code"><span class="info file"># File 'app/models/tasker/workflow_step.rb', line 413</span>
|
2700
|
+
|
2701
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_waiting_for_backoff?'>waiting_for_backoff?</span>
|
2702
|
+
<span class='comment'># Check if step is waiting for backoff period to expire
|
2703
|
+
</span> <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='op'>&.</span><span class='id identifier rubyid_next_retry_at'>next_retry_at</span>
|
2704
|
+
|
2705
|
+
<span class='id identifier rubyid_step_readiness_status'>step_readiness_status</span><span class='period'>.</span><span class='id identifier rubyid_next_retry_at'>next_retry_at</span> <span class='op'>></span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span>
|
2706
|
+
<span class='kw'>end</span></pre>
|
2707
|
+
</td>
|
2708
|
+
</tr>
|
2709
|
+
</table>
|
2710
|
+
</div>
|
2711
|
+
|
2712
|
+
</div>
|
2713
|
+
|
2714
|
+
</div>
|
2715
|
+
|
2716
|
+
<div id="footer">
|
2717
|
+
Generated on Tue Jul 1 16:47:37 2025 by
|
2718
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2719
|
+
0.9.37 (ruby-3.2.4).
|
2720
|
+
</div>
|
2721
|
+
|
2722
|
+
</div>
|
2723
|
+
</body>
|
2724
|
+
</html>
|