(
distinctId: string,
ip: string | null,
_siteUrl: string,
data: Partial<PluginEvent>,
teamId: number,
timestamp: DateTime,
eventUuid: string
)
| 106 | } |
| 107 | |
| 108 | async function processEvent( |
| 109 | distinctId: string, |
| 110 | ip: string | null, |
| 111 | _siteUrl: string, |
| 112 | data: Partial<PluginEvent>, |
| 113 | teamId: number, |
| 114 | timestamp: DateTime, |
| 115 | eventUuid: string |
| 116 | ): Promise<void> { |
| 117 | const pluginEvent: PluginEvent = { |
| 118 | distinct_id: distinctId, |
| 119 | site_url: _siteUrl, |
| 120 | team_id: teamId, |
| 121 | timestamp: timestamp.toUTC().toISO(), |
| 122 | now: timestamp.toUTC().toISO(), |
| 123 | ip: ip, |
| 124 | uuid: eventUuid, |
| 125 | ...data, |
| 126 | } as any as PluginEvent |
| 127 | |
| 128 | const runner = new EventPipelineRunner(hub, pluginEvent) |
| 129 | await runner.runEventPipeline(pluginEvent) |
| 130 | |
| 131 | await delayUntilEventIngested(() => hub.db.fetchEvents(), ++processEventCounter) |
| 132 | } |
| 133 | |
| 134 | // Simple client used to simulate sending events |
| 135 | // Use state object to simulate stateful clients that keep track of old |
no test coverage detected
searching dependent graphs…