class RefreshStsCredentialsJob
Re-syncs Trino catalog properties and rewrites the catalog Secret so that STS temporary credentials (which expire after ~1 hour) stay fresh. Without this job, Trino loses S3 access when the token expires and the engine was not restarted.
Public Instance Methods
Source
# File app/jobs/refresh_sts_credentials_job.rb, line 9 def perform return unless Catalog.where(s3_authentication_type: "sts").exists? catalogs = Catalog.includes(:catalog_credential) TrinoCatalogProjection.new.sync_all! TrinoSecretMaterializer.new.materialize!(catalogs) end
Only refreshes when at least one catalog uses STS. No-op otherwise.