diff --git a/app/jobs/auto_upgrade_job.rb b/app/jobs/auto_upgrade_job.rb index 30c10bc7e..34a0f3dc3 100644 --- a/app/jobs/auto_upgrade_job.rb +++ b/app/jobs/auto_upgrade_job.rb @@ -1,5 +1,5 @@ class AutoUpgradeJob < ApplicationJob - queue_as :default + queue_as :latency_low def perform(*args) raise_if_disabled diff --git a/app/jobs/destroy_job.rb b/app/jobs/destroy_job.rb index 2296c45f8..8ea120f65 100644 --- a/app/jobs/destroy_job.rb +++ b/app/jobs/destroy_job.rb @@ -1,5 +1,5 @@ class DestroyJob < ApplicationJob - queue_as :default + queue_as :latency_low def perform(model) model.destroy diff --git a/app/jobs/enrich_data_job.rb b/app/jobs/enrich_data_job.rb index 97286b823..f20875c82 100644 --- a/app/jobs/enrich_data_job.rb +++ b/app/jobs/enrich_data_job.rb @@ -1,5 +1,5 @@ class EnrichDataJob < ApplicationJob - queue_as :default + queue_as :latency_high def perform(account) account.enrich_data diff --git a/app/jobs/fetch_security_info_job.rb b/app/jobs/fetch_security_info_job.rb index 7dff6d0f0..5eaafa434 100644 --- a/app/jobs/fetch_security_info_job.rb +++ b/app/jobs/fetch_security_info_job.rb @@ -1,5 +1,5 @@ class FetchSecurityInfoJob < ApplicationJob - queue_as :default + queue_as :latency_low def perform(security_id) return unless Security.security_info_provider.present? diff --git a/app/jobs/import_job.rb b/app/jobs/import_job.rb index f7fc2c015..8a7c490ec 100644 --- a/app/jobs/import_job.rb +++ b/app/jobs/import_job.rb @@ -1,5 +1,5 @@ class ImportJob < ApplicationJob - queue_as :default + queue_as :latency_medium def perform(import) import.publish diff --git a/app/jobs/sync_job.rb b/app/jobs/sync_job.rb index c6f062536..187d18f73 100644 --- a/app/jobs/sync_job.rb +++ b/app/jobs/sync_job.rb @@ -1,5 +1,5 @@ class SyncJob < ApplicationJob - queue_as :default + queue_as :latency_medium def perform(sync) sync.perform diff --git a/app/jobs/user_purge_job.rb b/app/jobs/user_purge_job.rb index ff9978078..2f173f7a1 100644 --- a/app/jobs/user_purge_job.rb +++ b/app/jobs/user_purge_job.rb @@ -1,5 +1,5 @@ class UserPurgeJob < ApplicationJob - queue_as :default + queue_as :latency_low def perform(user) user.purge diff --git a/app/models/time_series.rb b/app/models/time_series.rb index 09091e8fd..f9ef3ffbf 100644 --- a/app/models/time_series.rb +++ b/app/models/time_series.rb @@ -37,6 +37,14 @@ class TimeSeries series: self end + def empty? + values.empty? + end + + def has_current_day_value? + values.any? { |v| v.date == Date.current } + end + # `as_json` returns the data shape used by D3 charts def as_json { diff --git a/app/views/accounts/chart.html.erb b/app/views/accounts/chart.html.erb index 67eee6fb4..329edba27 100644 --- a/app/views/accounts/chart.html.erb +++ b/app/views/accounts/chart.html.erb @@ -17,15 +17,19 @@
No data available for the selected period.
+No data available for the selected period.
+Calculating latest balance data...
No data available for the selected period.
+No data available for the selected period.
+Calculating latest balance data...