mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
set up cronjob to trigger xp calculation daily. set comment for fixes upcoming
This commit is contained in:
committed by
Alec LaLonde
parent
3a6876efe1
commit
645ff26499
@@ -9,6 +9,12 @@
|
||||
schedule: 31 5 * * *
|
||||
include_in_metadata: true
|
||||
payload: {}
|
||||
- name: syncBalances
|
||||
webhook: '{{ACTION_BASE_ENDPOINT}}/player/syncBalances'
|
||||
schedule: 0 3 * * *
|
||||
include_in_metadata: true
|
||||
payload: {}
|
||||
comment: Updates user's XP within guild
|
||||
- name: syncSourceCredLedger
|
||||
webhook: '{{ACTION_BASE_ENDPOINT}}/syncSourceCredAccounts'
|
||||
schedule: 0 1 * * *
|
||||
|
||||
@@ -109,7 +109,7 @@ export default async (req: Request, res: Response): Promise<void> => {
|
||||
),
|
||||
);
|
||||
const ranks = await client.GetPlayersByTotalXP();
|
||||
console.log(ranks);
|
||||
|
||||
Promise.allSettled(
|
||||
ranks.xp.map(async ({ playerId, seasonalBalance, balance }, index) => {
|
||||
const rank = computeRank(index);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// @to-do change the hardcoded address on line #8 to take a dynamic address once we standardize retrieiving token addresses from ANY guild.
|
||||
|
||||
export const PlayerQueries = /* GraphQL */ `
|
||||
query GetPlayersByTotalXP {
|
||||
xp(
|
||||
|
||||
Reference in New Issue
Block a user