about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/javascript/core/settings.js2
-rw-r--r--app/workers/scheduler/pghero_scheduler.rb11
2 files changed, 12 insertions, 1 deletions
diff --git a/app/javascript/core/settings.js b/app/javascript/core/settings.js
index 377c899dc..af97c84f9 100644
--- a/app/javascript/core/settings.js
+++ b/app/javascript/core/settings.js
@@ -56,7 +56,7 @@ delegate(document, '.input-copy input', 'click', ({ target }) => {
 });
 
 delegate(document, '.input-copy button', 'click', ({ target }) => {
-  const input = target.parentNode.querySelector('input');
+  const input = target.parentNode.querySelector('.input-copy__wrapper input');
 
   input.focus();
   input.select();
diff --git a/app/workers/scheduler/pghero_scheduler.rb b/app/workers/scheduler/pghero_scheduler.rb
new file mode 100644
index 000000000..4453bf2cd
--- /dev/null
+++ b/app/workers/scheduler/pghero_scheduler.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class Scheduler::PgheroScheduler
+  include Sidekiq::Worker
+
+  sidekiq_options unique: :until_executed, retry: 0
+
+  def perform
+    PgHero.capture_space_stats
+  end
+end