static void Main(string[] args) { try { var leagueId = 22356; // RunUltimateH2h(leagueId); return; var stopWatch = new Stopwatch(); stopWatch.Start(); var client = new EPLClient(new RequestExecutor(GlobalConfig.EplBaseUrl)); var allProcessorV3 = new AllProcessorV3(client, leagueId); var allProcessorV3Task = allProcessorV3.Process(); allProcessorV3Task.Wait(); stopWatch.Stop(); _log.Info($"All processing took {stopWatch.Elapsed.TotalSeconds} sec"); } catch (Exception ex) { _log.Error(ex); throw; } }
public H2hSimulator(EPLClient client, int team1Id, int team2Id) { if (client == null) { client = EPLClientFactory.createClient(); } _client = client; _team1Id = team1Id; _team2Id = team2Id; }
private async Task <bool> IsTimeToPoll(EPLClient client) { var eventFinder = new EventFinder(client); var currentTime = DateTime.Now; var ev = await eventFinder.GetCurrentEvent(); var eventStart = eventFinder.GetEventStartTime(ev); _log.Info(string.Format("Start date: {0}\n", eventStart.ToString())); _log.Info(string.Format("Current date: {0}\n", currentTime.ToString())); _log.Info(string.Format("Finished: {0}\n", ev.finished)); _log.Info(string.Format("Data checked: {0}\n", ev.data_checked)); if (ev.is_current && !ev.finished && !ev.data_checked) { return(true); } return(false); }
private static async Task <bool> IsTimeToPoll(EPLClient client) { var eventFinder = new EventFinder(client); var currentTime = DateTime.Now; var ev = await eventFinder.GetCurrentEvent(); var eventStart = eventFinder.GetEventStartTime(ev); _log.Info(string.Format("Start date: {0}\n", eventStart.ToString())); _log.Info(string.Format("Current date: {0}\n", currentTime.ToString())); _log.Info(string.Format("Finished: {0}\n", ev.finished)); _log.Info(string.Format("Data checked: {0}\n", ev.data_checked)); var fixtureTimer = new EventTimer(client); if (!await fixtureTimer.IsFixtureTime(ev)) { _log.Info("No fixtures are currently on"); return(false); } return(true); }
public CachePreloader(EPLClient client) { _client = client; }
public AllProcessorV3(EPLClient client, int leagueId) { _client = client; _leagueId = leagueId; }
public DailyProcessorV3(int leagueId, EPLClient client) { _leagueId = leagueId; _client = client; }
public EventFinder(EPLClient client) { _client = client; }
public TimelinePlayerProcessor(EPLClient client) { _client = client; }
public TimelinePredictor(int gameweek, EPLClient client) { _client = client; _gameweek = gameweek; }
public CloudConfigUpdater(EPLClient client) { _client = client != null ? client : EPLClientFactory.createClient(); }
public PlayerProcessorV3(EPLClient client) { initialize(client); }
private void initialize(EPLClient client) { _client = client; }
public LeagueStandingsProcessor(EPLClient client) { _client = client; }
public EventTimer(EPLClient client) { _client = client; }