Beispiel #1
0
            public async Task <TimeSpan> Execute()
            {
                DataRepository   repository = new DataRepository();
                ThirtyCollection collection = await repository.Get <ThirtyCollection>();

                ThirtyCrawler crawler = new ThirtyCrawler();

                collection.Apply(await crawler.List(page));
                await repository.Update(collection);

                return(TimeSpan.FromHours(1));
            }
Beispiel #2
0
        public async Task <TimeSpan> Execute()
        {
            DataRepository   repository = new DataRepository();
            ThirtyCollection collection = await repository.Get <ThirtyCollection>();

            ThirtyCrawler crawler = new ThirtyCrawler();
            ThirtyItem    missing = collection.MissingDetails().FirstOrDefault();

            if (missing != null)
            {
                collection.Apply(await crawler.Details(missing.Id));
                await repository.Update(collection);

                return(TimeSpan.FromSeconds(10));
            }

            return(TimeSpan.FromHours(10));
        }