Created
February 8, 2018 21:51
-
-
Save ktilcu/c6140266276c66bdc769604b0966f2f5 to your computer and use it in GitHub Desktop.
Firehose messages to queue
This file contains hidden or 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
| var Promise = require('bluebird'); | |
| var sqs = require('./queue'); | |
| var R = require('ramda'); | |
| var cli = require('cli'); | |
| var options = cli.parse({ | |
| dest: ['d', 'Destination queue url', 'string', undefined] | |
| }); | |
| var string = "omgmomgomgomgomg ogmomgomgmogmog gomgomgomomgomgmg"; | |
| if (options.dest) { | |
| var send = R.curry(sqs.sendMessages)(options.dest); | |
| var messages = Array(100000).fill(string); | |
| Promise.all(sqs.sendMessages(options.dest, messages)) | |
| .then(list => console.log('done')) | |
| }else { | |
| console.log('need queueUrls') | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment