Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. function sampleScriptRunning(activity){
  2. var ID = activity.map(function(activity){return activity.ID})
  3. for(var i = 0; i < ID.length; i++){
  4. if(ID[i] === 'undefined'){
  5. console.log('No more scripts to run')
  6. return;
  7. }
  8. Api.getActivityStatus(ID[i]).then(function(response){
  9. return $http.post('/proxy/api/nodejsjob/' + response.sample.sample[0].ScriptId + '/run')
  10. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement