Created
February 27, 2018 21:27
-
-
Save paractmol/8f0159de3830f363a07806822058c642 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCHEDULER.every '5s' do | |
stats = Requests::Wordpress.new.stats | |
send_event( | |
'page_views', | |
current: stats['visitors_today'], | |
last: stats['visitors_yesterday'] | |
) | |
stars = Requests::Github.new('https://github.com/sparklemotion/nokogiri').stars_count | |
send_event('stars_count', current: stars) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment