Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace :database do
- task :current_visits => :environment do
- Appsignal.set_gauge("current_visits", CurrentVisit.count)
- end
- task :done do
- # Wait for data to flush
- Appsignal.stop
- end
- task :all => [
- "custom_metrics:current_visits",
- "custom_metrics:done"
- ]
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement