Class: Magellan::Gcs::Proxy::PubsubProgressNotifier
- Inherits:
-
Object
- Object
- Magellan::Gcs::Proxy::PubsubProgressNotifier
- Defined in:
- lib/magellan/gcs/proxy/pubsub_progress_notifier.rb
Instance Attribute Summary collapse
-
#topic_name ⇒ Object
readonly
Returns the value of attribute topic_name.
Instance Method Summary collapse
-
#initialize(topic_name) ⇒ PubsubProgressNotifier
constructor
A new instance of PubsubProgressNotifier.
- #notify(severity, job_message, data, attrs) ⇒ Object
- #topic ⇒ Object
Constructor Details
#initialize(topic_name) ⇒ PubsubProgressNotifier
Returns a new instance of PubsubProgressNotifier.
11 12 13 |
# File 'lib/magellan/gcs/proxy/pubsub_progress_notifier.rb', line 11 def initialize(topic_name) @topic_name = topic_name end |
Instance Attribute Details
#topic_name ⇒ Object (readonly)
Returns the value of attribute topic_name.
10 11 12 |
# File 'lib/magellan/gcs/proxy/pubsub_progress_notifier.rb', line 10 def topic_name @topic_name end |
Instance Method Details
#notify(severity, job_message, data, attrs) ⇒ Object
19 20 21 |
# File 'lib/magellan/gcs/proxy/pubsub_progress_notifier.rb', line 19 def notify(severity, , data, attrs) topic.publish data, { level: severity, job_message_id: . }.merge(attrs) end |