Class: RefreshVaultTokens

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/refresh_vault_tokens.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.wait_timeObject



4
5
6
# File 'app/jobs/refresh_vault_tokens.rb', line 4

def self.wait_time
  (SETTINGS&.[](:foreman_vault)&.[](:refresh_tokens_wait_time) || 30).minutes
end

Instance Method Details

#humanized_nameObject



22
23
24
# File 'app/jobs/refresh_vault_tokens.rb', line 22

def humanized_name
  _('Refresh Vault tokens')
end

#performObject



14
15
16
# File 'app/jobs/refresh_vault_tokens.rb', line 14

def perform
  VaultConnection.with_valid_token.each(&:perform_renew_token)
end