Skip to content

Instantly share code, notes, and snippets.

@ItayPodhajcer
Last active January 16, 2020 08:42
Show Gist options
  • Save ItayPodhajcer/73647dc590ff7d31ac244a3c0ac724c5 to your computer and use it in GitHub Desktop.
Save ItayPodhajcer/73647dc590ff7d31ac244a3c0ac724c5 to your computer and use it in GitHub Desktop.
ethereum-event-azure-function-trigger/EthereumEventListener.ListenAsync
private async void ListenAsync(CancellationToken cancellationToken)
{
await Task.Run(async () =>
{
while (!cancellationToken.IsCancellationRequested)
{
var eventsData = await _event.GetFilterChangeDefault(_filter);
ProcessEvents(eventsData, cancellationToken);
await Task.Delay(EventPollingDelay);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment