-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_python.js
More file actions
52 lines (44 loc) · 1.19 KB
/
run_python.js
File metadata and controls
52 lines (44 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var exec=require('child_process').exec;
// var arg1='hadoop1:ai1';
var pvname=['hadoop1:ai1','hadoop1:ai2']
var async=require('async')
var epics=require('epics')
// exec('python testepics.py '+arg1,function(error,stdout,stderr){
// if(error){
// console.info(stderr);
// }
// console.log(stdout);
// });
async.map(pvname,function(item,callback){
exec('python testepics.py '+item,function(error,stdout,stderr){
if(error){
console.info(stderr);
}
// console.log(stdout);
});
},
function(err,results){
console.log('map:'+results);
})
// async.whilst(
// function(){
// return true
// },
// function(test){
// async.map(pvname,function(item,callback){
// exec('python testpymonitor.py '+item,function(error,stdout,stderr){
// if(error){
// console.info(stderr);
// }
// console.log(stdout);
// });
// test()
// },
// function(err,results){
// console.log('map:'+results);
// })
// },
// function(err){
// console.log('error')
// }
// )