How to use the azure-storage.QueueMessageEncoder function in azure-storage

To help you get started, we’ve selected a few azure-storage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CatalystCode / project-fortis / project-fortis-services / src / clients / storage / AzureQueueManager.js View on Github external
'use strict';

const azure = require('azure-storage');
const moment = require('moment');
const asyncEachLimit = require('async/eachLimit');
const TextBase64QueueMessageEncoder = require('azure-storage').QueueMessageEncoder.TextBase64QueueMessageEncoder;

const PRE_NLP_QUEUE = process.env.PRE_NLP_QUEUE;
const DATE_FORMAT = 'MM/DD/YYYY HH:mm';
const ASYNC_QUEUE_LIMIT = 50;

function getAzureQueueService(){
  let queueSvc = azure.createQueueService();
  queueSvc.messageEncoder = new TextBase64QueueMessageEncoder();
  queueSvc.createQueueIfNotExists(PRE_NLP_QUEUE, (error, result, response) => { // eslint-disable-line no-unused-vars
    if (error) {
      RaiseException(`Unable to create new azure queue ${PRE_NLP_QUEUE}`);
    }
  });

  return queueSvc;
}
github microsoft / vscode / build / tfs / darwin / enqueue.ts View on Github external
function queueSigningRequest(quality: string, commit: string): Promise {
	const retryOperations = new azure.ExponentialRetryPolicyFilter();
	const queueSvc = azure
		.createQueueService(process.env['AZURE_STORAGE_ACCOUNT_2'], process.env['AZURE_STORAGE_ACCESS_KEY_2'])
		.withFilter(retryOperations);

	queueSvc.messageEncoder = new azure.QueueMessageEncoder.TextBase64QueueMessageEncoder();

	const message = `${quality}/${commit}`;

	return new Promise((c, e) => queueSvc.createMessage('sign-darwin', message, err => err ? e(err) : c()));
}
github microsoft / vscode / build / tfs / darwin / enqueue.js View on Github external
function queueSigningRequest(quality, commit) {
    var retryOperations = new azure.ExponentialRetryPolicyFilter();
    var queueSvc = azure
        .createQueueService(process.env['AZURE_STORAGE_ACCOUNT_2'], process.env['AZURE_STORAGE_ACCESS_KEY_2'])
        .withFilter(retryOperations);
    queueSvc.messageEncoder = new azure.QueueMessageEncoder.TextBase64QueueMessageEncoder();
    var message = quality + "/" + commit;
    return new Promise(function (c, e) { return queueSvc.createMessage('sign-darwin', message, function (err) { return err ? e(err) : c(); }); });
}
function isBuildSigned(quality, commit) {