Tracked down a bug in a call to MongoDB that failed to ever return. It was trying to remove an index and the call never finished.
This commit is contained in:
@@ -5,6 +5,8 @@ import { Roles } from 'meteor/alanning:roles';
|
||||
//import SimpleSchema from "simpl-schema";
|
||||
import {AssetTypes} from "./asset-types";
|
||||
|
||||
// console.log("Setting Up Asset Assignments...")
|
||||
|
||||
export const AssetAssignments = new Mongo.Collection('assetAssignments');
|
||||
/*
|
||||
const TYPE_STUDENT = 1;
|
||||
@@ -42,8 +44,8 @@ if (Meteor.isServer) {
|
||||
//try {AssetAssignments._dropIndex("name")} catch(e) {}
|
||||
//AssetAssignments.createIndex({name: "text"}, {name: "name", unique: false});
|
||||
|
||||
try {AssetTypes._dropIndex("AssetID")} catch(e) {} //Typo put this as an index in AssetTypes instead of AssetAssignments.
|
||||
AssetAssignments.createIndex({assetId: 1}, {name: "AssetID", unique: false});
|
||||
//try {AssetTypes._dropIndex("AssetID")} catch(e) {} //Typo put this as an index in AssetTypes instead of AssetAssignments.
|
||||
//AssetAssignments.createIndex({assetId: 1}, {name: "AssetID", unique: false});
|
||||
|
||||
// This code only runs on the server
|
||||
Meteor.publish('assetAssignments', function(assetId) {
|
||||
@@ -57,11 +59,6 @@ if (Meteor.isServer) {
|
||||
});
|
||||
}
|
||||
Meteor.methods({
|
||||
'AssetAssignments.getOne'(assetId) {
|
||||
check(assetId, String);
|
||||
|
||||
return AssetAssignments.findOne(assetId);
|
||||
},
|
||||
/**
|
||||
* Assigns the asset to the assignee. The assignee should either be a Student or Staff member.
|
||||
* @param assetId The Mongo ID of the asset (asset._id).
|
||||
@@ -91,3 +88,4 @@ Meteor.methods({
|
||||
},
|
||||
});
|
||||
|
||||
// console.log("Asset assignments setup.")
|
||||
Reference in New Issue
Block a user