@@ -91,12 +91,13 @@ func initTasks() { | |||
jobs[taskMd.CronEggEnergyDealPlatformRevenueData] = taskEggEnergyDealPlatformRevenueData | |||
jobs[taskMd.CronEggEnergyDealFundData] = taskEggEnergyDealFundData | |||
jobs[taskMd.CronEggEnergyUserEggScore] = taskCronEggEnergyUserEggScore | |||
jobs[taskMd.CornEggEnergyAutoReleaseTeamEggEnergy] = taskEggEnergyAutoReleaseTeamEggEnergy // 蛋蛋能量-自动释放团队蛋蛋能量到个人能量 | |||
jobs[taskMd.CornSettlementStarLevelDividends] = taskEggEnergySettlementStarLevelDividends // 蛋蛋能量-结算星级分红 | |||
jobs[taskMd.CornEggEnergyDealUserPublicPlatoonPunish] = taskEggEnergyDealUserPublicPlatoonPunish // 蛋蛋能量-公排处罚 | |||
jobs[taskMd.CornEggEnergyAutoAdjustPrice] = taskEggEnergyAutoAdjustPrice // 蛋蛋能量-自动调整价格 | |||
jobs[taskMd.CornEggEnergyAutoCommunityDividends] = taskEggEnergyCommunityDividends // 蛋蛋能量-社区分红 | |||
jobs[taskMd.CornEggEnergyAutomaticScoring] = taskEggEnergyAutomaticScoring // 蛋蛋能量-自动打分 | |||
jobs[taskMd.CornEggEnergyAutoCachingEggPointStatistics] = taskAutoCachingEggPointStatistics // 蛋蛋分统计落地页-缓存 | |||
jobs[taskMd.CornEggEnergyAutoUpdateUserAccess] = taskEggEnergyAutoUpdateUserAccess // es蛋蛋分记录-自动更新访问次数 | |||
jobs[taskMd.CornEggEnergyAutoReleaseTeamEggEnergy] = taskEggEnergyAutoReleaseTeamEggEnergy // 蛋蛋能量-自动释放团队蛋蛋能量到个人能量 | |||
jobs[taskMd.CornSettlementStarLevelDividends] = taskEggEnergySettlementStarLevelDividends // 蛋蛋能量-结算星级分红 | |||
jobs[taskMd.CornEggEnergyDealUserPublicPlatoonPunish] = taskEggEnergyDealUserPublicPlatoonPunish // 蛋蛋能量-公排处罚 | |||
jobs[taskMd.CornEggEnergyAutoAdjustPrice] = taskEggEnergyAutoAdjustPrice // 蛋蛋能量-自动调整价格 | |||
jobs[taskMd.CornEggEnergyAutoCommunityDividends] = taskEggEnergyCommunityDividends // 蛋蛋能量-社区分红 | |||
jobs[taskMd.CornEggEnergyAutomaticScoring] = taskEggEnergyAutomaticScoring // 蛋蛋能量-自动打分 | |||
jobs[taskMd.CornEggEnergyAutoCachingEggPointStatistics] = taskAutoCachingEggPointStatistics // 蛋蛋分统计落地页-缓存 | |||
jobs[taskMd.CornEggEnergyAutoUpdateUserAccess] = taskEggEnergyAutoUpdateUserAccess // es蛋蛋分记录-自动更新访问次数 | |||
jobs[taskMd.CornEggEnergyAutoDeleteTableAdvertisingCallback] = taskAutoDeleteTableAdvertisingCallback // 定时清除七天以前的广告回调数据 | |||
} |
@@ -1,16 +1,17 @@ | |||
package md | |||
const ( | |||
CronEggEnergyAutoRecordPrices = "cron_egg_energy_auto_record_price" // 自动记录价格 | |||
CronEggEnergyDealPlatformRevenueData = "cron_egg_energy_deal_platform_revenue_data" // 处理平台收益 | |||
CronEggEnergyDealFundData = "cron_egg_energy_deal_fund_data" // 处理价值投入 | |||
CronEggEnergyUserEggScore = "cron_egg_energy_user_egg_score" // 处理蛋蛋分 | |||
CornEggEnergyAutoReleaseTeamEggEnergy = "cron_egg_energy_auto_release_team_egg_energy" // 处理团队蛋蛋能量释放到个人蛋蛋能量 | |||
CornSettlementStarLevelDividends = "cron_egg_energy_settlement_star_level_dividends" // 结算星级分红 | |||
CornEggEnergyDealUserPublicPlatoonPunish = "cron_egg_energy_deal_user_public_platoon_punish" // 公排处罚 | |||
CornEggEnergyAutoAdjustPrice = "cron_egg_energy_auto_adjust_price" // 自动调整价格 | |||
CornEggEnergyAutoCommunityDividends = "cron_egg_energy_community_dividends" // 社区分红 | |||
CornEggEnergyAutomaticScoring = "cron_egg_energy_automatic_score" // 自动打分 | |||
CornEggEnergyAutoCachingEggPointStatistics = "cron_egg_energy_auto_caching_egg_point_statistics" // 缓存蛋蛋分统计落地页 | |||
CornEggEnergyAutoUpdateUserAccess = "cron_egg_energy_auto_update_user_access" // 同步用户访问次数到es | |||
CronEggEnergyAutoRecordPrices = "cron_egg_energy_auto_record_price" // 自动记录价格 | |||
CronEggEnergyDealPlatformRevenueData = "cron_egg_energy_deal_platform_revenue_data" // 处理平台收益 | |||
CronEggEnergyDealFundData = "cron_egg_energy_deal_fund_data" // 处理价值投入 | |||
CronEggEnergyUserEggScore = "cron_egg_energy_user_egg_score" // 处理蛋蛋分 | |||
CornEggEnergyAutoReleaseTeamEggEnergy = "cron_egg_energy_auto_release_team_egg_energy" // 处理团队蛋蛋能量释放到个人蛋蛋能量 | |||
CornSettlementStarLevelDividends = "cron_egg_energy_settlement_star_level_dividends" // 结算星级分红 | |||
CornEggEnergyDealUserPublicPlatoonPunish = "cron_egg_energy_deal_user_public_platoon_punish" // 公排处罚 | |||
CornEggEnergyAutoAdjustPrice = "cron_egg_energy_auto_adjust_price" // 自动调整价格 | |||
CornEggEnergyAutoCommunityDividends = "cron_egg_energy_community_dividends" // 社区分红 | |||
CornEggEnergyAutomaticScoring = "cron_egg_energy_automatic_score" // 自动打分 | |||
CornEggEnergyAutoCachingEggPointStatistics = "cron_egg_energy_auto_caching_egg_point_statistics" // 缓存蛋蛋分统计落地页 | |||
CornEggEnergyAutoUpdateUserAccess = "cron_egg_energy_auto_update_user_access" // 同步用户访问次数到es | |||
CornEggEnergyAutoDeleteTableAdvertisingCallback = "cron_egg_energy_auto_delete_table_advertising_callback" // 同步用户访问次数到es | |||
) |
@@ -0,0 +1,22 @@ | |||
package task | |||
import ( | |||
"applet/app/task/svc" | |||
"math/rand" | |||
"time" | |||
"xorm.io/xorm" | |||
) | |||
func taskAutoDeleteTableAdvertisingCallback(eg *xorm.Engine) { | |||
for { | |||
if len(ch) > workerNum { | |||
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) | |||
} else { | |||
goto START | |||
} | |||
} | |||
START: | |||
ch <- 1 | |||
svc.AutoDeleteTableAdvertisingCallback(eg) | |||
<-ch | |||
} |