Skip to content

Commit

Permalink
started script not found error #89
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasar icli committed May 3, 2016
1 parent e8837d2 commit 27c68d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions imports/api/applications/server/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ import { TAPi18n } from 'meteor/tap:i18n';
import { _ } from 'meteor/underscore';

import Users from '../../users/users.js';
import { Logs } from '../../logs/logs.js';
import { Applications } from '../applications.js';

// Utils
import { BUNDLE_DIR, SYNC_EXEC_OPTIONS } from '../../bundles/utils.js';
import { LOG_TYPE_MAPPER } from '../../logs/utils.js';

// NPM PACKAGES
import pm2 from 'pm2';
Expand All @@ -22,7 +26,7 @@ Applications.helpers({
cwd: this.dir(),
autorestart: false,
watch: true,
env: _.extend({ PORT}, this.env)
env: _.extend({ PORT }, this.env)
}
},

Expand Down Expand Up @@ -79,6 +83,13 @@ Applications.helpers({
}));
}

// ERRORED LOGS INSERT
Logs.insert({
process: { name: self.bundleId },
type: LOG_TYPE_MAPPER.ERRORED,
data: start_error.msg
});

// IF STARTED ERROR THEN DISCONNECT
pm2.disconnect();
}));
Expand All @@ -103,7 +114,7 @@ Applications.helpers({
}));
},

// ##### --------- REBUILDING FIBERS -------------- #######
// ##### --------- REBUILDING -------------- #######
build() {
this.notification({
type: 'info',
Expand Down
2 changes: 1 addition & 1 deletion imports/api/logs/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Logs.attachSchema(new SimpleSchema({
process: { type: Object },

// PROCESS ID
'process.pm_id': { type: String },
'process.pm_id': { type: String, optional: true },

// APPLICATION BUNDLE ID
'process.name': { type: String },
Expand Down

0 comments on commit 27c68d2

Please sign in to comment.