Skip to content

Commit

Permalink
fixes for vm so synclets keep running
Browse files Browse the repository at this point in the history
  • Loading branch information
quartzjer committed Mar 2, 2012
1 parent 95796fe commit 7146162
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Common/node/lsyncmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ function executeSynclet(info, synclet, callback, force) {
info.status = synclet.status = "running";


if (synclet.vm) {
// Go ahead and create a context immediately so we get it listed as
if (info.vm || synclet.vm) {
// Go ahead and create a context immediately so we get it listed as
// running and dont' start mulitple ones
var sandbox = {
// XXX: This could be a problem later and need a cacheing layer to
// remove anything that they add, but for now we'll allow it
// XXX: This could be a problem later and need a cacheing layer to
// remove anything that they add, but for now we'll allow it
// direct and see the impact
require:require,
console:console,
Expand Down Expand Up @@ -255,6 +255,8 @@ function executeSynclet(info, synclet, callback, force) {
sandbox.exports.sync(info, function(syncErr, response) {
delete runningContexts[info.id + "/" + synclet.name];
if (syncErr) {
logger.error(synclet.name+" error: "+util.inspect(syncErr));
info.status = synclet.status = 'failed';
return callback(syncErr);
}
logger.info("Synclet "+synclet.name+" finished for "+info.id+" timing "+(Date.now() - tstart));
Expand Down

0 comments on commit 7146162

Please sign in to comment.