penguin-statistics / backend Goto Github PK
View Code? Open in Web Editor NEWPenguin Statistics backend.
Home Page: https://penguin-stats.io/
License: MIT License
Penguin Statistics backend.
Home Page: https://penguin-stats.io/
License: MIT License
Users might forget or lose their userId for various reasons: unexpected cookie expiration, insufficient brain memory, etc.
OAuth2
algorithm.The new version of the Arknights is already released for 4 days. Still haven't seen the corresponding updates in penguin-stats for the permanent activity - 生于黑夜. DM-6 to 8 still only had the stats up to April 8th. And the users have no place to upload their stats for the nowadays DM activity. Just wanna get a clue when it will be added to penguin-stats?
目前企鹅的异常信息较为混乱,缺乏统一的管理。
如:
public ResponseEntity<AdvancedQueryResponse> getAdvancedResultHelper(AdvancedQueryRequest advancedQueryRequest,
HttpServletRequest request) {
// 省略
advancedQueryRequest.getQueries().forEach(singleQuery -> {
try {
// 省略
BasicQueryResponse queryResponse = queryMapper.elementsToBasicQueryResponse(singleQuery, elements);
results.add(queryResponse);
} catch (TimeoutException toEx) {
log.error("TimeoutException in executeAdvancedQueries: ", toEx);
} catch (ExecutionException exeEx) {
log.error("ExecutionException in executeAdvancedQueries: ", exeEx);
} catch (Exception ex) {
log.error("Error in executeAdvancedQueries: ", ex);
}
});
AdvancedQueryResponse advancedQueryResponse = new AdvancedQueryResponse(results);
return new ResponseEntity<AdvancedQueryResponse>(advancedQueryResponse, HttpStatus.OK);
}
如上图代码。当查询结果超时时,queryMapper.elementsToBasicQueryResponse
就会throw一个TimeoutException,而上图代码catch住该异常后,仅仅是log了一个error日志,再无其他操作。在该业务逻辑的最后,直接将emptyList返回给上层代码,最终返回给前端。
而实际上,当成功调用queryMapper.elementsToBasicQueryResponse
时,其最终返回的结果中,是很有可能查询到数据的。
这对用户非常的不友好。
对于这种情况的代码,并不仅仅存在于某一处,在企鹅中也有其他类似的情况。
针对当前对异常的混乱处理,我将对企鹅中整体的异常体系进行重构,对异常进行统一化。
具体会在最上层异常分为两大类:
public ResponseEntity<AdvancedQueryResponse> getAdvancedResultHelper(AdvancedQueryRequest advancedQueryRequest,
HttpServletRequest request) {
// 省略
advancedQueryRequest.getQueries().forEach(singleQuery -> {
try {
// 省略
BasicQueryResponse queryResponse = queryMapper.elementsToBasicQueryResponse(singleQuery, elements);
results.add(queryResponse);
} catch (TimeoutException toEx) {
// example
throw new ServiceException("TimeoutException in executeAdvancedQueries.",toEx);
}
});
AdvancedQueryResponse advancedQueryResponse = new AdvancedQueryResponse(results);
return new ResponseEntity<AdvancedQueryResponse>(advancedQueryResponse, HttpStatus.OK);
}
对于ServiceException,在内部中,我们会把详细的堆栈信息打印出来以便于开发人员以及运维定位问题。而对于BusinessException,我们仅需log简单的一些msg日志即可
@AlvISsReimu commented on Wed Jul 01 2020
Sometimes user may want filtered drop results.
Add two parameters:
Both of them are comma separated list of itemId/stageId.
Tomcat, nginx, mongodb
N/A
Allow user to do a quick global query by:
Also, we can generate short URL for some of our pages:
/{server}/
)/{server}/
)我在试着写自动上传的东西 poi-statistics的数据收集是会收集上传的插件名称和版本号的 我觉得你们也可以整一个
之后无聊可以写写贡献排名x
https://github.com/ninthDevilHAUNSTER/ArknightsAutoHelper 在实现 v2 API 掉落数量验证的过程中,错误地将活动掉落从最终提交列表中移除[1]。
请考虑从自 2020 年 6 月至今(包括当前活动)的活动掉落样本中移除来自 ArknightsAutoHelper 的样本。
[1]: https://github.com/ninthDevilHAUNSTER/ArknightsAutoHelper/blob/18ac87a1c67d495aca385107978c4815ecc95936/penguin_stats/reporter.py#L140 ,由于 penguin-statistics/frontend-v2#175 ,活动掉落的数量由 ArknightsAutoHelper 自行验证,并通过一个 dirty hack 跳过使用 API 数据进行的验证。
另:修复过程中产生了
等多个包含活动掉落的 report,但似乎没有反映在在前端中查询到的数量中,希望确认是否包含活动掉落
程序需要升级,涉及以下问题:
并且spring boot 2.1已经EOL,建议升级
这一大坨我懒得列了,都是漏洞
解决办法就是升级springboot
Currently the international servers (including US and JP servers) are nearly being opened to the public players, thus the need of having both the item and stage names being localized is increased, indicating us, as the developer of Penguin Statistics, shall improve the localization support on such languages.
The backend will return localization string objects; an example can be:
{ "name": { "en": "Basic Combat Record", "zh": "基础作战记录", "ja": "基本的な戦闘記録" } }
PS: the translations are only for example: they might be wrong, so don't use them as the actual translation.
https://penguin-stats.io/report/stage/act18d3_zone1/act18d3_09
2021-05-10 以及 2021-05-11 早上9点左右都会自动出现这个问题无法汇报掉落,本地网络正常。
(error) [Ajax] failed Error: Request failed with status code 500
exports https://penguin-stats.io/js/chunk-vendors.0856f51d.js:1
exports https://penguin-stats.io/js/chunk-vendors.0856f51d.js:7
onreadystatechange https://penguin-stats.io/js/chunk-vendors.0856f51d.js:34
r https://penguin-stats.io/js/chunk-vendors.0856f51d.js:7
chunk-vendors.0856f51d.js:7:429139
Rt https://penguin-stats.io/js/chunk-vendors.0856f51d.js:7
value https://penguin-stats.io/js/app.e10a9b45.js:1
value https://penguin-stats.io/js/app.e10a9b45.js:1
9efd https://penguin-stats.io/js/app.e10a9b45.js:1
请问“物品掉落分时查询”这个功能实装以后,是否可以查询近三个月/近一个月等时间段内的掉落情况了?
(有些怀疑丫丁暗改掉率,但是好像企鹅物流目前的算法都是从开服时的数据一直滚到现在?)
To merge Planner into frontend-v2
main site, rarity 4 materials (D32钢
etc.) are required to be added in corresponded API and sprites image. Currently they are omitted since they're not dropped anywhere. We need to decide how to add them into items API and implement it.
https://penguin-stats.io/planner
I used the following configuration in the planner:
{"@type":"@penguin-statistics/planner/config","items":[{"id":"30135","have":5,"need":5},{"id":"30125","have":7,"need":5},{"id":"30115","have":8,"need":5},{"id":"30074","have":10,"need":10},{"id":"30073","have":26,"need":20},{"id":"30084","have":21,"need":10},{"id":"30083","have":18,"need":20},{"id":"30094","have":10,"need":10},{"id":"30093","have":20,"need":20},{"id":"30104","have":10,"need":10},{"id":"30103","have":17,"need":20},{"id":"30014","have":15,"need":10},{"id":"30013","have":19,"need":20},{"id":"30012","have":44},{"id":"30011","have":32},{"id":"30064","have":8},{"id":"30063","have":12,"need":20},{"id":"30062","have":4},{"id":"30061","have":6},{"id":"30034","have":14},{"id":"30033","have":48,"need":20},{"id":"30032","have":54},{"id":"30031","have":38},{"id":"30024","have":21,"need":10},{"id":"30023","have":21,"need":20},{"id":"30022","have":127},{"id":"30021","have":16},{"id":"30044","have":25,"need":10},{"id":"30043","have":30,"need":20},{"id":"30042","have":60},{"id":"30041","have":21},{"id":"30054","have":10,"need":10},{"id":"30053","have":5,"need":20},{"id":"30052","have":12},{"id":"30051","have":17},{"id":"31014","have":25,"need":10},{"id":"31013","have":28,"need":20},{"id":"31024","have":10,"need":10},{"id":"31023","have":24,"need":20},{"id":"30145","have":5,"need":5},{"id":"31034","have":10,"need":10},{"id":"31033","have":3,"need":20}],"options":{"byProduct":true,"requireExp":true,"requireLmb":true},"excludes":[]}
After calculating the planner gives the following syntheses suggestions:
Device
* 3Integrated Device
* 3Polyketon
* 8Aketon
* 10Polymerized Gel
* 4The Polymerized Gel
suggestion is incorrect, since I need only 10 and already have 25. I also have 5/5 晶体电子单元
which is the only higher level item that can be sythesized using Polymerized Gel
.
Even if I increase the number of Polymerized Gel
s I have from 25 to 29 without changing other numbers, the planner still suggests me to sythesize 4 more Polymerized Gel
s.
The planner should not suggest me to synthesize any more Polymerized Gels.
The planner always suggests me to synthesize 4 more Polymerized Gels, even if I increase the number of Polymerized Gels I have.
I ran into this bug when synthesizing items using the planner. It keeps suggesting me to synthesize Polymerized Gels and I was confused.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.