Class: Hydra::GlobalTask
Overview
A Hydra global task is a task that is run both locally and remotely.
For example:
Hydra::GlobalTask.new('db:reset')
Allows you to run:
rake hydra:db:reset
Then, db:reset will be run locally and on all remote workers. This makes it easy to setup your workers and run tasks all in a row.
For example:
rake hydra:db:reset hydra:factories hydra:tests
Assuming you setup hydra:db:reset and hydra:db:factories as global tasks and hydra:tests as a Hydra::TestTask for all your tests
Instance Attribute Summary
Attributes inherited from Task
#autosort, #config, #environment, #files, #listeners, #name, #runner_log_file, #serial, #show_time, #verbose
Instance Method Summary collapse
-
#initialize(name) ⇒ GlobalTask
constructor
A new instance of GlobalTask.
Methods inherited from Task
Constructor Details
#initialize(name) ⇒ GlobalTask
Returns a new instance of GlobalTask.
354 355 356 357 |
# File 'lib/hydra/tasks.rb', line 354 def initialize(name) @name = name define end |