Class: Onboarding::ProgressService::Async
- Inherits:
-
Object
- Object
- Onboarding::ProgressService::Async
- Defined in:
- app/services/onboarding/progress_service.rb
Instance Attribute Summary collapse
-
#namespace_id ⇒ Object
readonly
Returns the value of attribute namespace_id.
Instance Method Summary collapse
- #execute(action:) ⇒ Object
-
#initialize(namespace_id) ⇒ Async
constructor
A new instance of Async.
Constructor Details
#initialize(namespace_id) ⇒ Async
Returns a new instance of Async.
8 9 10 |
# File 'app/services/onboarding/progress_service.rb', line 8 def initialize(namespace_id) @namespace_id = namespace_id end |
Instance Attribute Details
#namespace_id ⇒ Object (readonly)
Returns the value of attribute namespace_id.
6 7 8 |
# File 'app/services/onboarding/progress_service.rb', line 6 def namespace_id @namespace_id end |
Instance Method Details
#execute(action:) ⇒ Object
12 13 14 15 16 |
# File 'app/services/onboarding/progress_service.rb', line 12 def execute(action:) return unless Onboarding::Progress.not_completed?(namespace_id, action) Onboarding::ProgressWorker.perform_async(namespace_id, action) end |