diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2018-01-01 14:52:08 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2018-01-01 14:52:08 +0100 |
| commit | 9820cad981750a9990e747e19dada1c42bebdd53 (patch) | |
| tree | 8975053d16e7f2571663812f0789eb4c10e4d7cb | |
| parent | b15a35404d66a2b59f45e13dfc11ea7ed541d057 (diff) | |
| download | telesucker-develop.tar.gz telesucker-develop.zip | |
expand phase to span whole gamedevelop
| -rw-r--r-- | worker.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -79,14 +79,18 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { // return telemetry { m_a_id, data, start, end } in an interval const gamePhase = (start, end) => { + // TODO: uncommented for better performance with a single game spanning phase + /* let spawn_plus_start = spawn_time.clone() .add(start, "seconds") .format("YYYY-MM-DDTHH:mm:ss"), spawn_plus_end = spawn_time.clone() .add(end, "seconds") .format("YYYY-MM-DDTHH:mm:ss"); + */ return { match_api_id: match_api_id, + /* data: telemetry.slice( // assumes Telemetry is ordered by timestamp, // assumes it uses the format as above @@ -94,13 +98,15 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { telemetry.findIndex((ev) => !(ev.time<spawn_plus_end)) // slice does not include end ), + */ + data: telemetry, start: start, end: end } }; // split into phases const phases = [ // genious idea to put bans into Telemetry. - gamePhase(-5 * 60, 0) // draft + gamePhase(-5 * 60, 5400) // bans + all ]; await Promise.each(phases, async (phase) => { if (phase.data.length > 0) { |
