Skip to content

Instantly share code, notes, and snippets.

} catch(e) {
}
const Rx = require('rxjs/Rx');
const mongoose = require('mongoose');
mongoose.connect('localhost:27017/spot-2016-11-15');
var SpotInstanceSchema = mongoose.Schema({ ami_id: 'string', name: 'string', zone: 'string' });
var SpotInstance = mongoose.model('spot_instance', SpotInstanceSchema);
var cursor = SpotInstance.find({}).cursor();
* Customer (id, email address, display name)
* ShoppingCart (contain Products, discounts)
SpotBidMarketItem Products (has price)
SpotBidProfile (AWS::SpotFleetConfig)
- user_id
- display_name
- instance_type (c4.large)
import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
import { Factory } from 'meteor/factory';
import { Todos } from '../todos/todos.js';
class SpotBidProfileCollection extends Mongo.Collection {
insert(list, callback) {
return super.insert(list, callback);
}
remove(selector, callback) {
import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
import { Factory } from 'meteor/factory';
import { Todos } from '../todos/todos.js';
class SpotBidProfileCollection extends Mongo.Collection {
insert(list, callback) {
return super.insert(list, callback);
}
remove(selector, callback) {
export const insert = new ValidatedMethod({
name: 'spot_bid_profiles.insert',
validate: new SpotBidProfiles.schema,
run({}) {
return SpotBidProfiles.insert({}, null, region);
},
});