Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/dashboard/app/lib/account_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ module AccountCache
# @return [Array<AccountInfo>] - the account info objects
def accounts
Rails.cache.fetch('account_info', expires_in: 4.hours) do
# only Slurm support in ood_core
# only Slurm & HTCondor support in ood_core
# job_clusters: not to be confused with clusters
slurm_job_clusters = Configuration.job_clusters.select(&:slurm?)
slurm_job_clusters.empty? ? [] : slurm_job_clusters.map(&:job_adapter).flat_map(&:accounts).uniq
job_clusters = Configuration.job_clusters.select { |c| c.slurm? || c.htcondor? }
job_clusters.empty? ? [] : job_clusters.map(&:job_adapter).flat_map(&:accounts).uniq
rescue StandardError => e
Rails.logger.warn("Did not get accounts from system with error #{e}")
Rails.logger.warn(e.backtrace.join("\n"))
Expand Down