Rebuild sftp addon after an apptask
This commit is contained in:
@@ -12,6 +12,7 @@ let assert = require('assert'),
|
||||
safe = require('safetydance'),
|
||||
path = require('path'),
|
||||
paths = require('./paths.js'),
|
||||
sftp = require('./sftp.js'),
|
||||
tasks = require('./tasks.js');
|
||||
|
||||
let gActiveTasks = { }; // indexed by app id
|
||||
@@ -74,6 +75,11 @@ function scheduleTask(appId, taskId, callback) {
|
||||
|
||||
delete gActiveTasks[appId];
|
||||
locker.unlock(locker.OP_APPTASK); // unlock event will trigger next task
|
||||
|
||||
// post app task hooks
|
||||
sftp.rebuild({}, function (error) {
|
||||
if (error) console.error('Unable to rebuild sftp:', error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user