public void UpdateFeeds()
        {
            try
            {
                logger.InfoFormat("Starting to update feeds");
                OUImportationController temp = new OUImportationController(new ZapposClassBuilder(), outfitUpdaterRepository, trendRepository, silouhetteRepository, patternRepository, colorFamilyRepository);
                temp.HaveHeader = true;
                temp.Separator  = "\t";
                temp.Filename   = "Zappos_Complete.txt";
                temp.Partner    = partnerRepository.GetByCode("ZP");
                temp.MemorySafe = Convert.ToDouble(5);

                logger.InfoFormat("Starting to import");
                temp.Create();

                logger.InfoFormat("Match updaters");
                MatchOutfitUpdaters();
            }
            catch (Exception ex)
            {
                logger.Error(ex);
                throw ex;
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            try
            {
                // Create the container
                IWindsorContainer container = new WindsorContainer();

                // Initialize NHibernate
                NHibernateInitializer.Instance().InitializeNHibernateOnce(
                    () => InitializeNHibernateSession());

                GC.Collect();
                OUImportationController temp = new OUImportationController(new ZapposClassBuilder(), new OutfitUpdaterRepository(), new TrendRepository());
                //OUImportationController temp = new OUImportationController(new ZapposClassBuilder(), null, null);
                temp.HaveHeader = true;
                if (args[0].ToLower() == "false")
                {
                    temp.HaveHeader = false;
                }
                temp.Separator = args[1];
                temp.Path      = args[2];
                temp.Filename  = args[3];
                if (args[4].ToLower() == "false")
                {
                    temp.Sync = false;
                }

                temp.MemorySafe = Convert.ToDouble(args[5]);
                temp.Create();
                GC.Collect();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }