Exemple #1
0
        protected override void RunCallback()
        {
            var dbFactory       = new DbFactory();
            var time            = new TimeService(dbFactory);
            var log             = GetLogger();
            var settings        = new SettingsService(dbFactory);
            var quantityManager = new QuantityManager(GetLogger(), time);
            var actionService   = new SystemActionService(GetLogger(), time);
            var priceManager    = new PriceManager(GetLogger(), time, dbFactory, actionService, settings);

            using (var db = dbFactory.GetRWDb())
            {
                db.DisableValidation();

                RetryHelper.ActionWithRetries(() => quantityManager.FixupListingQuantity(db, settings), log, retryCount: 1, throwException: false);

                RetryHelper.ActionWithRetries(() => priceManager.FixupListingPrices(db), log, retryCount: 1, throwException: false);

                //RetryHelper.ActionWithRetries(() => priceManager.FixupBusinessPrices(db), log, retryCount: 1, throwException: false);
                //RetryHelper.ActionWithRetries(() => priceManager.FixupFBAPrices(db), log, retryCount: 1, throwException: false);

                RetryHelper.ActionWithRetries(() => priceManager.FixupWalmartPrices(db), log, retryCount: 1, throwException: false);
            }
        }