-
Notifications
You must be signed in to change notification settings - Fork 113
feat: initial maxbattle tracking in poracle #929
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
Open
ReuschelCGN
wants to merge
32
commits into
KartulUdus:develop
Choose a base branch
from
ReuschelCGN:maxbattle
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
df96d74
Update package.json
ReuschelCGN 3b80cfb
Add files via upload
ReuschelCGN fcf4fbb
Add files via upload
ReuschelCGN 51b347f
Update dts.json
ReuschelCGN 7784e07
Update testdata.json
ReuschelCGN eb3b8c5
Update default.json
ReuschelCGN ba3b38b
Update de.json
ReuschelCGN 6bcc682
Update de.json
ReuschelCGN 372ba56
Update app.js
ReuschelCGN 0b44c51
Update app.js
ReuschelCGN e36187c
Update controllerWorker.js
ReuschelCGN ad67d7d
Update upgradeDts.js
ReuschelCGN 86a5ffe
Update util.json
ReuschelCGN 6e7f1ff
Update apiConfig.js
ReuschelCGN b3f9a0f
Update apiTracking.js
ReuschelCGN 9e17d6e
Add files via upload
ReuschelCGN fda4114
Add files via upload
ReuschelCGN cfe4927
Update telegramReconciliation.js
ReuschelCGN 1842d9c
Add files via upload
ReuschelCGN a7d3657
Add files via upload
ReuschelCGN 7930d91
Update discordReconciliation.js
ReuschelCGN 4d254b8
Update channelDelete.js
ReuschelCGN de85e27
Add files via upload
ReuschelCGN a6c46f1
Update backup.js
ReuschelCGN f8fcdb5
Add files via upload
ReuschelCGN 7352f2b
Update poracle-test.js
ReuschelCGN ac7a6ff
Update profile.js
ReuschelCGN 68e9b96
Update script.js
ReuschelCGN 3b5e63d
Update tracked.js
ReuschelCGN 4b43cfe
Update unregister.js
ReuschelCGN 5fe4eb1
Update uicons.js
ReuschelCGN c5ed218
Update maxbattle.js
ReuschelCGN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cache will expire well ahead of the max battle most probably, so this may not provide any value whatsoever.
What causes golbat to resend a station webhook and do we care that this will generate a new alert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hook.message.id -> Station ID
hook.message.battle_end -> is eqal to end_time in golbat DB
hook.message.battle_pokemon_id -> if this change we get a new alert on same station
Why the cache should expire in normal use ahead of the max battle end?
But on Maxmondays or Events, it should gen. a new alert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jabes meant that you put an element into cache, but the cache itself lasts for x minutes?! Maybe an hour? So cache lookup will almost never happen
Golbat is not sending any duplicate hooks, it only sends if there something changes, like battle end, or Pokémon etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the cache lasts an hour (I think). And the max battle has a duration much longer than that, so updates within the period will not be eliminated by the cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so the cache could look like that:
const cacheKey =${hook.message.id}${hook.message.battle_pokemon_id}``Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maxbattles have rotating moves and there are stationed mons which change, so i wanted to be sure, not to gen unnecessary alterts. But maybe im wrong with my thought.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Max Monday would be such a case... For one hour there is a certain mon deployed... After that hour it changes back to the old one.... Golbat might send another hook
But the old mon can be already available for days, a one hour cache won't belp on that duplicate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we increase the cache for max battles to 2h? So we would safely not send a duplicate webhook on the 7PM change? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PoracleJS/src/app.js
Line 49 in 1ab5309
looks like its gen. 90min cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... As the first webhook could be sent the day before, we might still send another hook at 7PM... If I think about it, that's not that bad I guess
Do you have some notification examples for max monday or e.g. this event with Toxtricity?! :)