Skip to content

Commit

Permalink
Caching of files on agent side, Better logs with download, search. Co…
Browse files Browse the repository at this point in the history
…mpile only when there are changes. New sencha.
  • Loading branch information
octoocto1 committed Aug 17, 2015
1 parent f4c6287 commit 6d58d26
Show file tree
Hide file tree
Showing 12 changed files with 604 additions and 114 deletions.
3 changes: 2 additions & 1 deletion agent/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ bin
executionfiles
Java
agent.pid
agent.vnc.pid
agent.vnc.pid
cache
13 changes: 6 additions & 7 deletions agent/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var common = require('./common');
var path = require('path');
//var idesync = require('./routes/idesync');

process.setMaxListeners(0);

var app = express();
process.env.TMPDIR = path.resolve(__dirname,"../logs");
Expand All @@ -23,29 +24,27 @@ app.configure(function(){
//app.use(express.cookieParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.timeout(300000));
//app.use(express.bodyParser({ keepExtensions: true, uploadDir: '/bin' }));
});

app.post('/command',command.Post);
app.post('/update',update.Post);
app.post('/fileupload',fileupload.Post);
app.post('/matchfile',fileupload.MatchFile);
app.post('/uploadfiles',uploadfiles.uploadFiles);
app.post('/recordimage',imageautomation.recordImage);
app.post('/startrecording',recorder.record);

app.configure('development', function(){
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});

app.configure('production', function(){
app.use(express.errorHandler());
});
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
app.use(express.errorHandler());
common.initLogger("agent");
common.parseConfig(function(){
app.listen(common.Config.AgentPort, function(){
if(common.Config.CloudAgent !== "true"){
heartbeat.startHeartBeat(common.Config.AppServerIPHost,common.Config.AppServerPort,common.Config.AgentPort,common.Config.AgentVNCPort,common.Config.AgentVersion,common.Config.OS);
}
common.logger.info('Agent Started.');
command.cleanUp();
//console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
});
Expand Down
Loading

0 comments on commit 6d58d26

Please sign in to comment.