Class: Content::Pulp::RepositorySyncStatus
- Inherits:
-
Object
- Object
- Content::Pulp::RepositorySyncStatus
- Defined in:
- app/services/content/pulp/repository_sync_status.rb
Constant Summary collapse
- HISTORY_ERROR =
'failed'- HISTORY_SUCCESS =
'success'- FINISHED =
'finished'- ERROR =
'error'- RUNNING =
'running'- WAITING =
'waiting'- CANCELED =
'canceled'- NOT_SYNCED =
'not synchronized'
Instance Attribute Summary collapse
-
#finish_time ⇒ Object
readonly
Returns the value of attribute finish_time.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#progress ⇒ Object
readonly
Returns the value of attribute progress.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#sync_metrics ⇒ Object
readonly
Returns the value of attribute sync_metrics.
-
#sync_times ⇒ Object
readonly
Returns the value of attribute sync_times.
-
#task_id ⇒ Object
readonly
Returns the value of attribute task_id.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ RepositorySyncStatus
constructor
A new instance of RepositorySyncStatus.
- #not_synced? ⇒ Boolean
- #running? ⇒ Boolean
Constructor Details
#initialize(attrs) ⇒ RepositorySyncStatus
Returns a new instance of RepositorySyncStatus.
13 14 15 16 17 18 19 20 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 13 def initialize(attrs) @state = NOT_SYNCED @sync_times = @sync_metrics = {} attrs.each do |k, v| instance_variable_set("@#{k}", v) if respond_to?("#{k}".to_sym) end end |
Instance Attribute Details
#finish_time ⇒ Object (readonly)
Returns the value of attribute finish_time.
2 3 4 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 2 def finish_time @finish_time end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
2 3 4 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 2 def end |
#progress ⇒ Object (readonly)
Returns the value of attribute progress.
2 3 4 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 2 def progress @progress end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
2 3 4 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 2 def start_time @start_time end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
2 3 4 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 2 def state @state end |
#sync_metrics ⇒ Object (readonly)
Returns the value of attribute sync_metrics.
2 3 4 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 2 def sync_metrics @sync_metrics end |
#sync_times ⇒ Object (readonly)
Returns the value of attribute sync_times.
2 3 4 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 2 def sync_times @sync_times end |
#task_id ⇒ Object (readonly)
Returns the value of attribute task_id.
2 3 4 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 2 def task_id @task_id end |
Instance Method Details
#not_synced? ⇒ Boolean
22 23 24 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 22 def not_synced? state == NOT_SYNCED end |
#running? ⇒ Boolean
26 27 28 |
# File 'app/services/content/pulp/repository_sync_status.rb', line 26 def running? state == RUNNING end |