Skip to content

Instantly share code, notes, and snippets.

@XavierGeerinck
Created March 31, 2018 08:26
Show Gist options
  • Save XavierGeerinck/50057611924ad7f307bc4decc2c9b890 to your computer and use it in GitHub Desktop.
Save XavierGeerinck/50057611924ad7f307bc4decc2c9b890 to your computer and use it in GitHub Desktop.
const azure = require('azure-storage');
const config = require('./config');
const queueService = azure.createQueueService(config.azureStorageAccount, config.azureStorageAccessKey);
console.log(`[Queue - Receiver] Truncating Queue`);
queueService.clearMessages(config.queueName, (error, response) => {
if (error) {
console.log(error);
}
console.log(`[Queue - Receiver] Queue cleared: ${JSON.stringify(response)}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment