Class: Pindo::TaskSystem::UnityUpdateTask
- Defined in:
- lib/pindo/module/task/model/unity/unity_update_task.rb
Overview
Unity 更新必备库任务用于强制更新 Unity 项目的必备库(NugetForUnity)
Instance Attribute Summary
Attributes inherited from UnityTask
#project_path, #unity_root_path
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
-
.task_key ⇒ Object
任务键.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ UnityUpdateTask
constructor
A new instance of UnityUpdateTask.
- #validate ⇒ Object
Methods inherited from UnityTask
#before_retry, default_retry_count, default_retry_delay, default_retry_mode, task_type, task_type_name, #unity_helper
Methods inherited from PindoTask
#before_retry, #cancel, #cancelled?, #check_cancelled!, #data_param, default_retry_count, default_retry_delay, default_retry_mode, #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_type
Constructor Details
#initialize(options = {}) ⇒ UnityUpdateTask
Returns a new instance of UnityUpdateTask.
16 17 18 19 20 21 22 |
# File 'lib/pindo/module/task/model/unity/unity_update_task.rb', line 16 def initialize( = {}) @unity_exe_path = nil # 将在 do_work 中自动查找 # 传递 project_path 给基类 [:project_path] ||= Dir.pwd super("Unity工具库更新", ) end |
Class Method Details
.task_key ⇒ Object
任务键
10 11 12 |
# File 'lib/pindo/module/task/model/unity/unity_update_task.rb', line 10 def self.task_key :unity_update end |
Instance Method Details
#validate ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/pindo/module/task/model/unity/unity_update_task.rb', line 24 def validate super # 验证 Unity 工程是否存在 unless unity_helper.unity_project?(@unity_root_path) raise Informative, "当前目录不是 Unity 工程:#{@unity_root_path}" end true end |