活动:修改获取活动逻辑,从serverlist上剥离
This commit is contained in:
@@ -7,6 +7,7 @@ import { getServerMainten, setServerMainten, stopServerMainten } from '../../../
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
import { ActivityInRemote } from '../../../domain/activityField/activityField';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
import { ActivityGroupModel } from '../../../db/ActivityGroup';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -39,9 +40,9 @@ export class ActivityRemote {
|
||||
|
||||
public async loadActivities() {
|
||||
try {
|
||||
let servers = await ServerlistModel.findByEnv(this.app.get('env'));
|
||||
for(let { id: serverId, activityGroupId } of servers) {
|
||||
for(let groupId of activityGroupId) {
|
||||
let activityGroup = await ActivityGroupModel.findAllActivityGroup();
|
||||
for(let { groupId, serverIds } of activityGroup) {
|
||||
for(let serverId of serverIds) {
|
||||
if(!this.groupToServer.has(groupId)) {
|
||||
this.groupToServer.set(groupId, []);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user