Tribe__Events__Aggregator__Record__Queue_Realtime::receive_heartbeat( $response, $data )
Action to reply every time a heart beat is executed to send the progress of EA if an EA record is present.
Contents
Parameters
-
(<span class="arrayarray<string,) (Required) mixed> $data An array with the data from the client.
Return
(array<string,) mixed> An array used to construct the heart beat response.
Source
File: src/Tribe/Aggregator/Record/Queue_Realtime.php
public function receive_heartbeat( $response, $data ) {
if ( empty( $data['ea_record'] ) ) {
return $response;
}
$this->record_id = absint( $data['ea_record'] );
if ( 0 === $this->record_id ) {
return $response;
}
$data = $this->get_queue_progress_data();
if ( empty( $data ) ) {
return $response;
}
$response['ea_progress'] = $data;
return $response;
}
Changelog
| Version | Description |
|---|---|
| 5.4.0 | Introduced. |