How to use the emit function from pm2

Find comprehensive JavaScript pm2.emit code examples handpicked from public code repositorys.

133
134
135
136
137
138
139
140
141
142
    };
}
portfolio[symbol].balance += data.executedQty;
portfolio[symbol].purchasePrice = (portfolio[symbol].purchasePrice * (portfolio[symbol].balance - data.executedQty) + data.price * data.executedQty) / portfolio[symbol].balance;
portfolio.USDT.balance -= data.executedQty * data.price;
pm2.emit('trade_log', {
    name: 'trade_log',
    tradeType: 'buy',
    symbol: symbol,
    price: data.price,
fork icon0
star icon0
watch icon1

+ 51 other calls in file