Class: RefreshVaultToken
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- RefreshVaultToken
- Defined in:
- app/jobs/refresh_vault_token.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.retry_attempts ⇒ Object
8 9 10 |
# File 'app/jobs/refresh_vault_token.rb', line 8 def self.retry_attempts SETTINGS&.[](:foreman_vault)&.[](:refresh_token_retry_attempts) || 3 end |
.retry_wait ⇒ Object
4 5 6 |
# File 'app/jobs/refresh_vault_token.rb', line 4 def self.retry_wait (SETTINGS&.[](:foreman_vault)&.[](:refresh_token_retry_wait) || 5).minutes end |
Instance Method Details
#humanized_name ⇒ Object
25 26 27 |
# File 'app/jobs/refresh_vault_token.rb', line 25 def humanized_name _('Refresh Vault token') end |
#perform(vault_connection_id) ⇒ Object
16 17 18 19 |
# File 'app/jobs/refresh_vault_token.rb', line 16 def perform(vault_connection_id) vault_connection = VaultConnection.with_valid_token.find(vault_connection_id) vault_connection.try(:renew_token!) end |