|
|
@ -45,14 +45,10 @@ public class CollectStatisticService extends BaseUpdater { |
|
|
if (!collectableStatistic.isStatsRequests()) |
|
|
if (!collectableStatistic.isStatsRequests()) |
|
|
logger.info(collectableStatistic.toString()); |
|
|
logger.info(collectableStatistic.toString()); |
|
|
|
|
|
|
|
|
UUID rnd = UUID.randomUUID(); |
|
|
|
|
|
Long cur = Instant.now().getEpochSecond(); |
|
|
|
|
|
logger.info("[~] Stats " + rnd.toString()); |
|
|
|
|
|
jdbcTemplate.update("INSERT INTO web_statistic (steam64, client_ip, method, path, query, useragent) VALUES (?, ?, ?, ?, ?, ?)", |
|
|
jdbcTemplate.update("INSERT INTO web_statistic (steam64, client_ip, method, path, query, useragent) VALUES (?, ?, ?, ?, ?, ?)", |
|
|
collectableStatistic.getSteam64(), collectableStatistic.getClient_ip(), |
|
|
collectableStatistic.getSteam64(), collectableStatistic.getClient_ip(), |
|
|
collectableStatistic.getMethod(), collectableStatistic.getPath(), |
|
|
collectableStatistic.getMethod(), collectableStatistic.getPath(), |
|
|
collectableStatistic.getQuery(), collectableStatistic.getUseragent()); |
|
|
collectableStatistic.getQuery(), collectableStatistic.getUseragent()); |
|
|
logger.info("[+] Stats " + rnd.toString() + " ts: " + (Instant.now().getEpochSecond() - cur) + "s"); |
|
|
|
|
|
} catch (Exception err) { |
|
|
} catch (Exception err) { |
|
|
logger.error("Ignoring add stats"); |
|
|
logger.error("Ignoring add stats"); |
|
|
} |
|
|
} |
|
|
|