Skip to content

Commit

Permalink
Revert "enhance: TLキャッシュ容量を設定できるように"
Browse files Browse the repository at this point in the history
This reverts commit c74fff1.
  • Loading branch information
anatawa12 committed Oct 11, 2023
1 parent 0f55162 commit a3cfff3
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 238 deletions.
1 change: 0 additions & 1 deletion locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,6 @@ export interface Locale {
"notificationRecieveConfig": string;
"mutualFollow": string;
"fileAttachedOnly": string;
"externalServices": string;
"_announcement": {
"forExistingUsers": string;
"forExistingUsersDescription": string;
Expand Down
1 change: 0 additions & 1 deletion locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,6 @@ edited: "編集済み"
notificationRecieveConfig: "通知の受信設定"
mutualFollow: "相互フォロー"
fileAttachedOnly: "ファイル付きのみ"
externalServices: "外部サービス"

_announcement:
forExistingUsers: "既存ユーザーのみ"
Expand Down
22 changes: 0 additions & 22 deletions packages/backend/migration/1696373953614-meta-cache-settings.js

This file was deleted.

20 changes: 0 additions & 20 deletions packages/backend/src/models/Meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,24 +471,4 @@ export class MiMeta {
length: 1024, array: true, default: '{ "admin", "administrator", "root", "system", "maintainer", "host", "mod", "moderator", "owner", "superuser", "staff", "auth", "i", "me", "everyone", "all", "mention", "mentions", "example", "user", "users", "account", "accounts", "official", "help", "helps", "support", "supports", "info", "information", "informations", "announce", "announces", "announcement", "announcements", "notice", "notification", "notifications", "dev", "developer", "developers", "tech", "misskey" }',
})
public preservedUsernames: string[];

@Column('integer', {
default: 300,
})
public perLocalUserUserTimelineCacheMax: number;

@Column('integer', {
default: 100,
})
public perRemoteUserUserTimelineCacheMax: number;

@Column('integer', {
default: 300,
})
public perUserHomeTimelineCacheMax: number;

@Column('integer', {
default: 300,
})
public perUserListTimelineCacheMax: number;
}
103 changes: 48 additions & 55 deletions packages/backend/src/server/api/endpoints/admin/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,157 +105,170 @@ export const meta = {
type: 'boolean',
optional: false, nullable: false,
},
userStarForReactionFallback: {
type: 'boolean',
optional: true, nullable: false,
},
pinnedUsers: {
type: 'array',
optional: false, nullable: false,
optional: true, nullable: false,
items: {
type: 'string',
optional: false, nullable: false,
},
},
hiddenTags: {
type: 'array',
optional: false, nullable: false,
optional: true, nullable: false,
items: {
type: 'string',
optional: false, nullable: false,
},
},
blockedHosts: {
type: 'array',
optional: false, nullable: false,
optional: true, nullable: false,
items: {
type: 'string',
optional: false, nullable: false,
},
},
sensitiveWords: {
type: 'array',
optional: false, nullable: false,
optional: true, nullable: false,
items: {
type: 'string',
optional: false, nullable: false,
},
},
preservedUsernames: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'string',
optional: false, nullable: false,
},
},
hcaptchaSecretKey: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
recaptchaSecretKey: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
turnstileSecretKey: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
sensitiveMediaDetection: {
type: 'string',
optional: false, nullable: false,
optional: true, nullable: false,
},
sensitiveMediaDetectionSensitivity: {
type: 'string',
optional: false, nullable: false,
optional: true, nullable: false,
},
setSensitiveFlagAutomatically: {
type: 'boolean',
optional: false, nullable: false,
optional: true, nullable: false,
},
enableSensitiveMediaDetectionForVideos: {
type: 'boolean',
optional: false, nullable: false,
optional: true, nullable: false,
},
proxyAccountId: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
format: 'id',
},
summaryProxy: {
type: 'string',
optional: true, nullable: true,
},
email: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
smtpSecure: {
type: 'boolean',
optional: false, nullable: false,
optional: true, nullable: false,
},
smtpHost: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
smtpPort: {
type: 'number',
optional: false, nullable: true,
optional: true, nullable: true,
},
smtpUser: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
smtpPass: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
swPrivateKey: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
useObjectStorage: {
type: 'boolean',
optional: false, nullable: false,
optional: true, nullable: false,
},
objectStorageBaseUrl: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
objectStorageBucket: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
objectStoragePrefix: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
objectStorageEndpoint: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
objectStorageRegion: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
objectStoragePort: {
type: 'number',
optional: false, nullable: true,
optional: true, nullable: true,
},
objectStorageAccessKey: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
objectStorageSecretKey: {
type: 'string',
optional: false, nullable: true,
optional: true, nullable: true,
},
objectStorageUseSSL: {
type: 'boolean',
optional: false, nullable: false,
optional: true, nullable: false,
},
objectStorageUseProxy: {
type: 'boolean',
optional: false, nullable: false,
optional: true, nullable: false,
},
objectStorageSetPublicRead: {
type: 'boolean',
optional: false, nullable: false,
optional: true, nullable: false,
},
enableIpLogging: {
type: 'boolean',
optional: false, nullable: false,
optional: true, nullable: false,
},
enableActiveEmailValidation: {
type: 'boolean',
optional: false, nullable: false,
optional: true, nullable: false,
},
enableChartsForRemoteUser: {
type: 'boolean',
Expand All @@ -275,28 +288,12 @@ export const meta = {
},
manifestJsonOverride: {
type: 'string',
optional: false, nullable: false,
optional: true, nullable: false,
},
policies: {
type: 'object',
optional: false, nullable: false,
},
perLocalUserUserTimelineCacheMax: {
type: 'number',
optional: false, nullable: false,
},
perRemoteUserUserTimelineCacheMax: {
type: 'number',
optional: false, nullable: false,
},
perUserHomeTimelineCacheMax: {
type: 'number',
optional: false, nullable: false,
},
perUserListTimelineCacheMax: {
type: 'number',
optional: false, nullable: false,
},
},
},
} as const;
Expand All @@ -316,7 +313,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-

private metaService: MetaService,
) {
super(meta, paramDef, async () => {
super(meta, paramDef, async (ps, me) => {
const instance = await this.metaService.fetch(true);

return {
Expand Down Expand Up @@ -402,10 +399,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
enableIdenticonGeneration: instance.enableIdenticonGeneration,
policies: { ...DEFAULT_POLICIES, ...instance.policies },
manifestJsonOverride: instance.manifestJsonOverride,
perLocalUserUserTimelineCacheMax: instance.perLocalUserUserTimelineCacheMax,
perRemoteUserUserTimelineCacheMax: instance.perRemoteUserUserTimelineCacheMax,
perUserHomeTimelineCacheMax: instance.perUserHomeTimelineCacheMax,
perUserListTimelineCacheMax: instance.perUserListTimelineCacheMax,
};
});
}
Expand Down
20 changes: 0 additions & 20 deletions packages/backend/src/server/api/endpoints/admin/update-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ export const paramDef = {
serverRules: { type: 'array', items: { type: 'string' } },
preservedUsernames: { type: 'array', items: { type: 'string' } },
manifestJsonOverride: { type: 'string' },
perLocalUserUserTimelineCacheMax: { type: 'integer' },
perRemoteUserUserTimelineCacheMax: { type: 'integer' },
perUserHomeTimelineCacheMax: { type: 'integer' },
perUserListTimelineCacheMax: { type: 'integer' },
},
required: [],
} as const;
Expand Down Expand Up @@ -445,22 +441,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.manifestJsonOverride = ps.manifestJsonOverride;
}

if (ps.perLocalUserUserTimelineCacheMax !== undefined) {
set.perLocalUserUserTimelineCacheMax = ps.perLocalUserUserTimelineCacheMax;
}

if (ps.perRemoteUserUserTimelineCacheMax !== undefined) {
set.perRemoteUserUserTimelineCacheMax = ps.perRemoteUserUserTimelineCacheMax;
}

if (ps.perUserHomeTimelineCacheMax !== undefined) {
set.perUserHomeTimelineCacheMax = ps.perUserHomeTimelineCacheMax;
}

if (ps.perUserListTimelineCacheMax !== undefined) {
set.perUserListTimelineCacheMax = ps.perUserListTimelineCacheMax;
}

const before = await this.metaService.fetch(true);

await this.metaService.update(set);
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/server/api/endpoints/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ export const meta = {
type: 'boolean',
optional: false, nullable: false,
},
localTimeline: {
localTimeLine: {
type: 'boolean',
optional: false, nullable: false,
},
globalTimeline: {
globalTimeLine: {
type: 'boolean',
optional: false, nullable: false,
},
Expand Down
Loading

0 comments on commit a3cfff3

Please sign in to comment.