Class: Pindo::TaskSystem::JPSTask
- Defined in:
- lib/pindo/module/task/model/jps_task.rb
Overview
JPS 任务基类所有 JPS 相关任务的父类,提供通用的 JPS 操作和配置
Direct Known Subclasses
JPSMessageTask, JPSResignTask, JPSUploadMediaTask, JPSUploadTask
Instance Attribute Summary collapse
-
#app_info_obj ⇒ Object
readonly
Returns the value of attribute app_info_obj.
-
#project_name ⇒ Object
readonly
Returns the value of attribute project_name.
-
#workflow_info ⇒ Object
readonly
Returns the value of attribute workflow_info.
Attributes inherited from PindoTask
#callbacks_setup, #context, #created_at, #data_dependencies, #dependencies, #error, #finished_at, #id, #max_retry_count, #metadata, #name, #priority, #result, #retry_count, #retry_delay, #retry_mode, #started_at, #status, #task_key, #task_manager, #type
Class Method Summary collapse
- .default_retry_count ⇒ Object
- .default_retry_delay ⇒ Object
-
.default_retry_mode ⇒ Object
JPS 任务默认重试配置.
-
.task_type ⇒ Object
JPS 任务类型.
-
.task_type_name ⇒ Object
JPS 任务类型显示名称.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ JPSTask
constructor
A new instance of JPSTask.
Methods inherited from PindoTask
#before_retry, #cancel, #cancelled?, #check_cancelled!, #data_param, #do_task, #execution_time, #finished?, #get_all_data_params, #get_all_data_params_by_key, #get_all_dependencies_results, #get_data_param, #get_data_param_by_key, #get_dependency_result, #get_dependency_task, #on, #primary_data_param, #reset_for_retry, #retryable?, #running?, #should_retry?, task_key, #validate
Constructor Details
#initialize(name, options = {}) ⇒ JPSTask
Returns a new instance of JPSTask.
11 12 13 14 15 16 17 |
# File 'lib/pindo/module/task/model/jps_task.rb', line 11 def initialize(name, = {}) @app_info_obj = [:app_info_obj] @workflow_info = [:workflow_info] @project_name = [:project_name] super(name, ) end |
Instance Attribute Details
#app_info_obj ⇒ Object (readonly)
Returns the value of attribute app_info_obj.
9 10 11 |
# File 'lib/pindo/module/task/model/jps_task.rb', line 9 def app_info_obj @app_info_obj end |
#project_name ⇒ Object (readonly)
Returns the value of attribute project_name.
9 10 11 |
# File 'lib/pindo/module/task/model/jps_task.rb', line 9 def project_name @project_name end |
#workflow_info ⇒ Object (readonly)
Returns the value of attribute workflow_info.
9 10 11 |
# File 'lib/pindo/module/task/model/jps_task.rb', line 9 def workflow_info @workflow_info end |
Class Method Details
.default_retry_count ⇒ Object
34 35 36 |
# File 'lib/pindo/module/task/model/jps_task.rb', line 34 def self.default_retry_count 3 # 默认重试 3 次 end |
.default_retry_delay ⇒ Object
38 39 40 |
# File 'lib/pindo/module/task/model/jps_task.rb', line 38 def self.default_retry_delay 10 # 默认延迟 10 秒 end |
.default_retry_mode ⇒ Object
JPS 任务默认重试配置
30 31 32 |
# File 'lib/pindo/module/task/model/jps_task.rb', line 30 def self.default_retry_mode RetryMode::DELAYED # 延迟重试 end |
.task_type ⇒ Object
JPS 任务类型
20 21 22 |
# File 'lib/pindo/module/task/model/jps_task.rb', line 20 def self.task_type :jps end |
.task_type_name ⇒ Object
JPS 任务类型显示名称
25 26 27 |
# File 'lib/pindo/module/task/model/jps_task.rb', line 25 def self.task_type_name "JPS操作" end |