Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function EmitEventList(client, event_list, EL_ind, EL_len){
- if(EL_ind >= EL_len){
- return;
- }
- var event = event_list[EL_ind]
- var event_name = event["@type"].split("/")[5];
- if(event["action"])
- event_name += "." + event["action"].split("#")[1];
- var event_body = JSON.stringify(event);
- client.publish("test.going_insane", event_body, function(){
- console.log("Peep!");
- EmitEventList(client, event_list, ++EL_ind, EL_len);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement