Compare commits

..

No commits in common. "459add190246600811fbac03ae348a49e85fe26c" and "0c8db74e720dd11f09dc9c84afbc6354ae84ebf5" have entirely different histories.

4 changed files with 5 additions and 10 deletions

View File

@ -4,12 +4,7 @@
- -
### Client ### Client
- Feat: Websocket接続を行わずにMisskeyを利用するNo Websocketモードが実装されました(beta) -
- サーバーのパフォーマンス向上に寄与することが期待されます
- 何らの理由によりWebsocket接続が行えない環境でも快適に利用可能です
- 従来のWebsocket接続を行うモードはリアルタイムモードとして再定義されました
- チャットなど、一部の機能は引き続き設定に関わらずWebsocket接続が行われます
- Enhance: メモリ使用量を軽減しました
### Server ### Server
- -

View File

@ -86,7 +86,7 @@ const storageProvider: StorageProvider = {
}); });
}, },
cloudGetBulk: async (ctx) => { cloudGets: async (ctx) => {
// TODO: 値の取得を1つのリクエストで済ませたい(バックエンド側でAPIの新設が必要) // TODO: 値の取得を1つのリクエストで済ませたい(バックエンド側でAPIの新設が必要)
const fetchings = ctx.needs.map(need => storageProvider.cloudGet(need).then(res => [need.key, res] as const)); const fetchings = ctx.needs.map(need => storageProvider.cloudGet(need).then(res => [need.key, res] as const));
const cloudDatas = await Promise.all(fetchings); const cloudDatas = await Promise.all(fetchings);

View File

@ -79,7 +79,7 @@ export type PreferencesProfile = {
export type StorageProvider = { export type StorageProvider = {
save: (ctx: { profile: PreferencesProfile; }) => void; save: (ctx: { profile: PreferencesProfile; }) => void;
cloudGetBulk: <K extends keyof PREF>(ctx: { needs: { key: K; scope: Scope; }[] }) => Promise<Partial<Record<K, ValueOf<K>>>>; cloudGets: <K extends keyof PREF>(ctx: { needs: { key: K; scope: Scope; }[] }) => Promise<Partial<Record<K, ValueOf<K>>>>;
cloudGet: <K extends keyof PREF>(ctx: { key: K; scope: Scope; }) => Promise<{ value: ValueOf<K>; } | null>; cloudGet: <K extends keyof PREF>(ctx: { key: K; scope: Scope; }) => Promise<{ value: ValueOf<K>; } | null>;
cloudSet: <K extends keyof PREF>(ctx: { key: K; scope: Scope; value: ValueOf<K>; }) => Promise<void>; cloudSet: <K extends keyof PREF>(ctx: { key: K; scope: Scope; value: ValueOf<K>; }) => Promise<void>;
}; };
@ -240,7 +240,7 @@ export class PreferencesManager {
} }
} }
const cloudValues = await this.storageProvider.cloudGetBulk({ needs }); const cloudValues = await this.storageProvider.cloudGets({ needs });
for (const _key in PREF_DEF) { for (const _key in PREF_DEF) {
const key = _key as keyof PREF; const key = _key as keyof PREF;

View File

@ -140,7 +140,7 @@ function importProfile() {
export async function cloudBackup() { export async function cloudBackup() {
if ($i == null) return; if ($i == null) return;
if (!canAutoBackup()) { if (!canAutoBackup()) {
throw new Error('cannot auto backup for this profile'); throw new Error('Profile name is not set');
} }
await misskeyApi('i/registry/set', { await misskeyApi('i/registry/set', {