修改邮件发件人, 修改奖池投放规则

This commit is contained in:
CounterFire2023 2024-05-20 15:20:39 +08:00
parent d608384ca3
commit 72d1a1df25
2 changed files with 6 additions and 7 deletions

View File

@ -11,11 +11,9 @@ import { RewardRecord } from 'models/RewardRecrd'
const addRewards = async (type: number) => { const addRewards = async (type: number) => {
logger.info('schedule add rewards for type: ', type) logger.info('schedule add rewards for type: ', type)
try { try {
for (let i = 0; i < 10; i++) { let record = new RewardRecord({ type })
let record = new RewardRecord({ type }) await record.save()
await record.save() new ZRedisClient().pub.sadd(REDIS_KEY, record.id)
new ZRedisClient().pub.sadd(REDIS_KEY, record.id)
}
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} }
@ -25,7 +23,8 @@ const addRewards = async (type: number) => {
let opts = { url: process.env.REDIS } let opts = { url: process.env.REDIS }
new ZRedisClient(opts) new ZRedisClient(opts)
logger.info('REDIS Connected') logger.info('REDIS Connected')
schedule.scheduleJob('0 0 0 * * *', async () => { // 2,4,6,8,10,12,14,16,18,20 各添加一次
schedule.scheduleJob('0 2,4,6,8,10,12,14,16,18,20 * * *', async () => {
await addRewards(1) await addRewards(1)
}) })
addRewards(1) addRewards(1)

View File

@ -54,7 +54,7 @@ export interface IMailData {
} }
const DEFAULT_MSG_DATA: IMailData = { const DEFAULT_MSG_DATA: IMailData = {
from: 'CEBG <noreply@cebg.games>', from: 'Counter Fire <noreply@counterfire.games>',
to: '', to: '',
subject: 'Please verify your email address', subject: 'Please verify your email address',
} }