예제 #1
0
        protected static async Task <T> AttemptAndRetry_Mobile <T>(Func <Task <T> > action, int numRetries = 3, IDictionary <string, string>?properties = null, [CallerMemberName] string callerName = "")
        {
            await UpdateActivityIndicatorStatus(true).ConfigureAwait(false);

            try
            {
                using var timedEvent = _analyticsService.TrackTime(callerName, properties);
                return(await AttemptAndRetry(action, numRetries).ConfigureAwait(false));
            }
            finally
            {
                await UpdateActivityIndicatorStatus(false).ConfigureAwait(false);
            }
        }
예제 #2
0
        public async Task CleanUpDatabase()
        {
            using var timedEvent = _analyticsService.TrackTime($"{nameof(BackgroundFetchService)}.{nameof(CleanUpDatabase)} Triggered");

            await Task.WhenAll(_referringSitesDatabase.DeleteExpiredData(), _repositoryDatabase.DeleteExpiredData()).ConfigureAwait(false);
        }