async fn wait_for_sync_data<'c>(
sync_update_subscriber: Subscriber,
transaction: &mut TransactedDb<'c>,
session: &SessionInfo,
initial: bool,
sync_token: &mut SyncToken,
filter_definition: Option<&FilterDefinition>,
timeout: Duration,
) -> Result<Option<SyncData>, InternalServerError>Expand description
Given a [arminius_lib_nats::Subscriber] instanced from
sync_data_subscriber, wait until it receives a NATS message about a new
sync response.
Then, it checks in the database if there are any new data to synchronize
whenever a new message is received by that subscriber, using a call to
fetch_sync_data.