Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
connected: function(connection) { // next: now update broker and master user records (the patterns at least)
this.connected = true;
Logger.get('exchange').info('The secure broker exchange is now connected to the bus as a client.');
this.connection = connection;
callback();
}.bind(this),
errored : function(errors) {
_validateTemporaryVolume(volume, snapshot) {
const
logger = Logger.get(snapshot.SnapshotId),
// The volume may or may not be GPG-encrypted on S3, so check for both:
ddKeyPlaintext = createS3KeyForSnapshotVolumeImage(snapshot, true, false),
ddKeyEncrypted = createS3KeyForSnapshotVolumeImage(snapshot, true, true);
let
isEncrypted = false;
// Check if we have a dd image in S3 to validate against
return this.s3.headObject({
Bucket: this.options.bucket,
Key: ddKeyPlaintext
}).promise()
.catch(err => {
// Okay, look for an encrypted version instead...
isEncrypted = true;
_uploadTemporaryVolume(volume, snapshot) {
const
logger = Logger.get(snapshot.SnapshotId),
/**
* @type {S3.PutObjectRequest}
*/
s3Params = {
Bucket: this.options.bucket,
Metadata: {
"snapshot-starttime": moment(snapshot.StartTime).format(), // Defaults to ISO8601
"snapshot-snapshotid": snapshot.SnapshotId,
"snapshot-volumesize": "" + snapshot.VolumeSize,
"snapshot-volumeid": snapshot.VolumeId,
"snapshot-description": snapshot.Description,
}
},
tags = this._sanitiseSnapshotTagsForS3(snapshot.Tags);
define(function(require, exports, module) {
var $ = require('jquery');
var Logger = require('js-logger');
Logger.useDefaults();
var L = Logger.get('main');
var Converter = require('Converter');
var Renderer = require('Renderer');
var Player = require('Player');
var musicjson;
/*
var examples = [
'./examples/scales.xml',
'./examples/sonata16.xml', // x
'./examples/adeste.xml',
'./examples/inv4.xml',
'./examples/inv1.xml',
'./examples/test_notations.xml',
'./examples/blank_a7.xml'
];
init = function() {
Logger = require('js-logger');
Logger.useDefaults();
Logger.setLevel(Logger.INFO);
Logger.get('broker').setLevel(Logger.INFO);
Logger.get('exchange').setLevel(Logger.INFO);
Logger.get('bus').setLevel(Logger.INFO);
Logger.get('cache').setLevel(Logger.INFO);
Logger.get('connection').setLevel(Logger.INFO);
Logger.get('register').setLevel(Logger.INFO);
Logger.get('request').setLevel(Logger.INFO);
Logger.get('transport').setLevel(Logger.INFO);
Logger.get('server').setLevel(Logger.INFO);
Logger.get('server-web').setLevel(Logger.INFO);
Logger.get('server-socket').setLevel(Logger.INFO);
godsend.Logger = Class.extend({
initialize : function(properties) {
Object.assign(this, properties);
}
});
export function getLogger(name: string) {
return Logger.get(name);
}
initializeInternalLevels : function(level) {
Logger.get('broker').setLevel(level);
Logger.get('exchange').setLevel(level);
Logger.get('bus').setLevel(level);
Logger.get('cache').setLevel(level);
Logger.get('connection').setLevel(level);
Logger.get('register').setLevel(level);
Logger.get('request').setLevel(level);
Logger.get('transport').setLevel(level);
Logger.get('server').setLevel(level);
Logger.get('server-web').setLevel(level);
Logger.get('server-socket').setLevel(level);
},
init = function() {
Logger = require('js-logger');
Logger.useDefaults();
Logger.setLevel(Logger.INFO);
Logger.get('broker').setLevel(Logger.INFO);
Logger.get('exchange').setLevel(Logger.INFO);
Logger.get('bus').setLevel(Logger.INFO);
Logger.get('cache').setLevel(Logger.INFO);
Logger.get('connection').setLevel(Logger.INFO);
Logger.get('register').setLevel(Logger.INFO);
Logger.get('request').setLevel(Logger.INFO);
Logger.get('transport').setLevel(Logger.INFO);
Logger.get('server').setLevel(Logger.INFO);
Logger.get('server-web').setLevel(Logger.INFO);
Logger.get('server-socket').setLevel(Logger.INFO);
godsend.Logger = Class.extend({
initialize : function(properties) {
Object.assign(this, properties);
}
});
};
_findOrAttachVolumeToInstance(volume, snapshot) {
let
logger = Logger.get(snapshot.SnapshotId),
attachment = volume.Attachments.find(attachment => attachment.InstanceId === this.instanceIdentity.instanceId);
if (attachment) {
if (attachment.State === "attached") {
logger.info("Volume " + volume.VolumeId + " is already attached here");
return Promise.resolve(volume);
} else if (attachment.State === "attaching") {
logger.info("Volume " + volume.VolumeId + " is already in the process of attaching...");
return awsTools.waitForVolumeAttach(this.ec2, volume.VolumeId, this.instanceIdentity.instanceId, VOLUME_ATTACH_POLL_MAX_RETRY, VOLUME_ATTACH_POLL_INTERVAL);
}
}
return new Promise((resolve, reject) => {
let