Class: Jets::Rails::Job::Queue::Check
- Inherits:
-
Object
- Object
- Jets::Rails::Job::Queue::Check
- Includes:
- Util::Logging
- Defined in:
- lib/jets/rails/job/queue/check.rb
Defined Under Namespace
Classes: Error
Constant Summary collapse
- @@error_message =
"ERROR: Unable to get queue url".color(:red)
Instance Method Summary collapse
- #exist! ⇒ Object
- #existance! ⇒ Object
-
#initialize(job) ⇒ Check
constructor
A new instance of Check.
- #job_enable_message ⇒ Object
- #queue_url ⇒ Object
Constructor Details
#initialize(job) ⇒ Check
Returns a new instance of Check.
7 8 9 |
# File 'lib/jets/rails/job/queue/check.rb', line 7 def initialize(job) @job = job end |
Instance Method Details
#exist! ⇒ Object
12 13 14 15 |
# File 'lib/jets/rails/job/queue/check.rb', line 12 def exist! existance! end |
#existance! ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/jets/rails/job/queue/check.rb', line 21 def existance! return if queue_url log.error @@error_message raise Error, "Are you sure you have deployed with Jets.project.config.job.enable = true ?" rescue Jets::Api::Error::NotFound log.error @@error_message raise Error, "It does not look like the stack has successfully deployed. Please deploy first." end |
#job_enable_message ⇒ Object
31 32 33 34 35 36 |
# File 'lib/jets/rails/job/queue/check.rb', line 31 def return if queue_url log.error @@error_message raise Error, "Are you sure that config.job.enable = true ?" end |