public void CallCheckQty()
        {
            var settings   = new SettingsService(_dbFactory);
            var qtyManager = new QuantityManager(_log, _time);

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

                qtyManager.FixupListingQuantity(db, settings);
            }
        }
Example #2
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);
            }
        }