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
} catch(e) { | |
} |
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
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(); |
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
* 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) |
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
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) { |
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
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) { |
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
export const insert = new ValidatedMethod({ | |
name: 'spot_bid_profiles.insert', | |
validate: new SpotBidProfiles.schema, | |
run({}) { | |
return SpotBidProfiles.insert({}, null, region); | |
}, | |
}); |
OlderNewer