Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

任务汇报策略 #26

Closed
lawvs opened this issue Apr 18, 2020 · 4 comments
Closed

任务汇报策略 #26

lawvs opened this issue Apr 18, 2020 · 4 comments

Comments

@lawvs
Copy link

lawvs commented Apr 18, 2020

api_no 存在复用情况导致部分新任务数据不正确

Workaround 1

定期删除 mongoose 的 Quest 数据(可以同时用 GitHub 库备份/合并旧数据甚至能弄成解决方案 2 的样子

Solution 2

后端 poooi/poi-server 可以使用 api_no+ api_title 作为复合主键 Edited: Using hash is a wiser choice.


另外希望追加报告其他可能有用的字段如 api_get_materialapi_label_type 和最早报告时间(年月日)

More details: poooi/plugin-translator#46

如果有空的话,还可以联动 kcwikizh/kcwiki-report#11

Quest data example:

/kcsapi/api_get_member/questlist.api_data.api_list[]

{
  "api_no": 915,
  "api_category": 9,
  "api_type": 4,
  "api_label_type": 1,
  "api_state": 1,
  "api_title": "【春の期間限定任務】飛べ!下駄履きメカジキ",
  "api_detail": "【春の期間限定任務】水上機母艦を旗艦とし、随伴護衛艦に駆逐艦または海防艦を含む水上機運用艦隊で、<br>南西諸島防衛線、東部オリョール海、沖ノ島海域へ展開!同海域の敵艦隊と交戦、これを撃破せよ!",
  "api_voice_id": 0,
  "api_get_material": [0, 300, 300, 600],
  "api_bonus_flag": 1,
  "api_progress_flag": 0,
  "api_invalid_flag": 0
}
@gakada
Copy link
Contributor

gakada commented Apr 21, 2020

As option 3, maybe Quest should be like ShipStat and EnemyInfo (https://github.com/poooi/poi-server/blob/master/controllers/api/v2/report.es#L262, all data is unique, with timestamps and counters on top).

@gakada
Copy link
Contributor

gakada commented Apr 21, 2020

Then instead of known_quests it can be known_quest_hashes (e.g., SHA-1 of the whole quest data as JSON), so that it is possible to properly track api_detail/api_get_material/etc. changes while still not sending a lot of reports.

@lawvs
Copy link
Author

lawvs commented Apr 23, 2020

@gakada You are right. Using hash is a wiser choice for tracing data changes.

@lawvs
Copy link
Author

lawvs commented Oct 21, 2021

It looks like Tanaka no longer reuses quest api_no.

@lawvs lawvs closed this as completed Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants