require 'json'
require 'resque'
require 'resque-retry'
require 'net/http'
require 'digest/md5'

module JamRuby
  class MusicSessionReminder
    extend Resque::Plugins::JamLonelyJob

    @queue = :music_session_reminder

    @@log = Logging.logger[MusicSessionReminder]

    def self.lock_timeout
      120
    end

    def self.perform
      @@log.debug("MusicSessionReminder waking up")

      MusicSessionReminder.new.run

      @@log.debug("MusicSessionReminder done")
    end

    def run
      Notification.send_session_reminders()
    end
  end
end