Skip to content

Instantly share code, notes, and snippets.

@laser
Created September 24, 2014 06:00
Show Gist options
  • Save laser/1ceb592abcf653f946e1 to your computer and use it in GitHub Desktop.
Save laser/1ceb592abcf653f946e1 to your computer and use it in GitHub Desktop.
entries
var entries = messageWindow
.filter(function(acc) {
return acc.length === 20;
});
.flatMap(function(messages) {
return Bacon.retry({
retries: 10,
delay: function() { return 100; },
source: function() {
return Bacon.fromNodeCallback(client, 'post', 'log', {
messages: messages
});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment