Conversation
Collaborator
|
最後分兩個部分確認一下
接著比較是code quality的部分,你可以上完之後再來處理重構\文件。
|
Collaborator
Author
|
1.從月分的collection倒資料到年的資料庫的程式碼我是寫script處理,因為是一次性暫時任務,這部分沒有commit上去 |
Collaborator
通常會盡量把程式碼變成文件,可以想成把運行cron跟設定job這兩件事情分開 // jobs.js
// require需要的job function進來
module.exports = [
{
schedule: '0 18 1 * *', // 每個月1號晚上6點推波
job: notifyBillboardJobFunc,
}
]// cron.js
// 這裡就引入jobs.js然後start他們 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
查詢leaderboard input從date改為year跟month分開傳遞
資料存放的結構改為
collection為leaderboard-年份
每個文檔格式:
discordId
month
year
point
在merge進去之前請先通知我,我會將10月的資料整進新collection,就可以部署了