コード例 #1
0
        public bool Do(string sessionId, int bunchSize)
        {
            Init();

            _sessionId = sessionId;
            _randomizer.Buildup(bunchSize * 30, bunchSize * 600, bunchSize * 6000);

            var watch = new Stopwatch();

            watch.Start();

            try
            {
                var nextBunch = DoNextBunch(bunchSize);
                _pusherPregData.AddToSaveQueue(nextBunch);
            }
            catch (Exception e)
            {
                ConsoleWriteline("Got exception in DoNextBunch(): " + e.Message);
                throw;
            }

            watch.Stop();
            ConsoleWriteline("Done with next bunch of " + bunchSize + ". It took " + watch.Elapsed.TotalMinutes + " minutes");

            return(true);
        }