-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
This is potentially the biggest re-write to the PS2Alerts backend since V4.
This is to create a system that will utilise the Census endpoint https://census.daybreakgames.com/get/ps2:v2/world_event?type=metagame&c:limit=500 that pulls in all alerts since 1st Nov 2019.
Using this data, we should be able to reconstruct the entire alert meta since that date, including beyond Jan 2021 when PS2A formally started collecting again.
Event data types
The below events are available:
Varunda has a copy of event data as of 2021-07-09, however it wil have to be a CSV data dump as there's no API on honu.
Methodology
Create a job that upon an API request accepting World and a date range, performs the following:
- Pulls in
MetagameEventfor the date range. This must support paging as Census limits to 1000 events.
1.1 Handling of alerts the end the day after or start the day before. This can likely be handled by increasing the start and end times by 5400 seconds (1:30 hours each way) - Creates a list of Alerts based of start and end metagame event pairs (each start should have an end). TImeout checks need to occur (>2 hours is abnormal and needs handling)
- Pulls in a list of events from Census based on the following event types:
DEATH
FACILITY_CONTROL
VEHICLE_DESTROY
e.g. https://census.daybreakgames.com/s:ps2alertsdotcom/get/ps2:v2/event?type=DEATH&after=1572571800&before=1572566400 to pull in all deaths in that alert range.
A filter for world will need to be applied, it is not possible to filter by world on /event.
- Clear the current data for the alert in question (via instanceID)
- Send the events to a special RabbitMQ queue for Aggregator to ingest.