Guest User

Untitled

a guest
May 24th, 2019
73
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. namespace :database do
  2. task :current_visits => :environment do
  3. Appsignal.set_gauge("current_visits", CurrentVisit.count)
  4. end
  5.  
  6. task :done do
  7. # Wait for data to flush
  8. Appsignal.stop
  9. end
  10.  
  11. task :all => [
  12. "custom_metrics:current_visits",
  13. "custom_metrics:done"
  14. ]
  15. end
RAW Paste Data