Skip to content

Instantly share code, notes, and snippets.

@arockwell
Created July 12, 2012 18:11
Show Gist options
  • Save arockwell/3099822 to your computer and use it in GitHub Desktop.
Save arockwell/3099822 to your computer and use it in GitHub Desktop.
updateRedisBatchInfo = (batch_id, device_type, count) ->
console.log("Setting key: sent_alerts:#{batch_id}:#{device_type}")
redis.incrby("sent_alerts:#{batch_id}:#{device_type}", count)
redis.incrby("batch_count:#{batch_id}:#{device_type}", 1)
redis.get("batch_count:#{batch_id}:#{device_type}", (err, data) ->
console.log("sent: #{data}")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment