Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
206ddd6d36 | |||
b4cf963bd6 | |||
77b493c9b0 | |||
95a5ff5625 | |||
190753aa99 | |||
f778696a76 | |||
ce4fb49d4c | |||
91b89b79d2 |
@ -1,11 +1,7 @@
|
|||||||
# Management guide
|
# Management guide
|
||||||
|
|
||||||
## Check the status of the job queue
|
## Check the status of the job queue
|
||||||
In the directory of Misskey:
|
coming soon
|
||||||
``` shell
|
|
||||||
node_modules/kue/bin/kue-dashboard -p 3050
|
|
||||||
```
|
|
||||||
When you access port 3050, you will see the UI.
|
|
||||||
|
|
||||||
## Mark as 'admin' user
|
## Mark as 'admin' user
|
||||||
``` shell
|
``` shell
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
# 運営ガイド
|
# 運営ガイド
|
||||||
|
|
||||||
## ジョブキューの状態を調べる
|
## ジョブキューの状態を調べる
|
||||||
Misskeyのディレクトリで:
|
coming soon
|
||||||
``` shell
|
|
||||||
node_modules/kue/bin/kue-dashboard -p 3050
|
|
||||||
```
|
|
||||||
ポート3050にアクセスするとUIが表示されます
|
|
||||||
|
|
||||||
## 管理者ユーザーを設定する
|
## 管理者ユーザーを設定する
|
||||||
``` shell
|
``` shell
|
||||||
|
@ -51,7 +51,7 @@ common:
|
|||||||
my-token-regenerated: "Twój token został wygenerowany. Zostaniesz wylogowany."
|
my-token-regenerated: "Twój token został wygenerowany. Zostaniesz wylogowany."
|
||||||
i-like-sushi: "Wolę sushi od puddingu"
|
i-like-sushi: "Wolę sushi od puddingu"
|
||||||
show-reversi-board-labels: "Pokazuj podpisy wierszy i kolumn w Reversi"
|
show-reversi-board-labels: "Pokazuj podpisy wierszy i kolumn w Reversi"
|
||||||
verified-user: "認証済みのユーザー"
|
verified-user: "Zweryfikowany użytkownik"
|
||||||
reversi:
|
reversi:
|
||||||
drawn: "Remis"
|
drawn: "Remis"
|
||||||
my-turn: "Twoja kolej"
|
my-turn: "Twoja kolej"
|
||||||
@ -289,8 +289,8 @@ desktop/views/components/drive.file.vue:
|
|||||||
banner: "Baner"
|
banner: "Baner"
|
||||||
contextmenu:
|
contextmenu:
|
||||||
rename: "Zmień nazwę"
|
rename: "Zmień nazwę"
|
||||||
mark-as-sensitive: "閲覧注意に設定"
|
mark-as-sensitive: "Oznacz jako zawartość wrażliwą"
|
||||||
unmark-as-sensitive: "閲覧注意を解除"
|
unmark-as-sensitive: "Cofnij oznaczenie jako zawartość wrażliwą"
|
||||||
copy-url: "Skopiuj adres"
|
copy-url: "Skopiuj adres"
|
||||||
download: "Pobierz"
|
download: "Pobierz"
|
||||||
else-files: "Inne"
|
else-files: "Inne"
|
||||||
@ -335,11 +335,11 @@ desktop/views/components/drive.vue:
|
|||||||
upload: "Wyślij plik"
|
upload: "Wyślij plik"
|
||||||
url-upload: "Wyślij z adresu URL"
|
url-upload: "Wyślij z adresu URL"
|
||||||
desktop/views/components/media-image.vue:
|
desktop/views/components/media-image.vue:
|
||||||
sensitive: "閲覧注意"
|
sensitive: "To jest zawartość NSFW"
|
||||||
click-to-show: "クリックして表示"
|
click-to-show: "Naciśnij aby wyświetlić"
|
||||||
desktop/views/components/media-video.vue:
|
desktop/views/components/media-video.vue:
|
||||||
sensitive: "閲覧注意"
|
sensitive: "To jest zawartość NSFW"
|
||||||
click-to-show: "クリックして表示"
|
click-to-show: "Naciśnij aby wyświetlić"
|
||||||
desktop/views/components/follow-button.vue:
|
desktop/views/components/follow-button.vue:
|
||||||
following: "Śledzisz"
|
following: "Śledzisz"
|
||||||
follow: "Śledź"
|
follow: "Śledź"
|
||||||
@ -414,8 +414,8 @@ desktop/views/components/post-form.vue:
|
|||||||
insert-a-kao: "v('ω')v"
|
insert-a-kao: "v('ω')v"
|
||||||
create-poll: "Utwórz ankietę"
|
create-poll: "Utwórz ankietę"
|
||||||
text-remain: "pozostałe znaki: {}"
|
text-remain: "pozostałe znaki: {}"
|
||||||
recent-tags: "最近"
|
recent-tags: "Ostatnie"
|
||||||
click-to-tagging: "クリックでタグ付け"
|
click-to-tagging: "Naciśnij aby oznaczyć"
|
||||||
desktop/views/components/post-form-window.vue:
|
desktop/views/components/post-form-window.vue:
|
||||||
note: "Nowy wpis"
|
note: "Nowy wpis"
|
||||||
reply: "Odpowiedz"
|
reply: "Odpowiedz"
|
||||||
@ -737,11 +737,11 @@ mobile/views/components/drive.file-detail.vue:
|
|||||||
hash: "Hash (md5)"
|
hash: "Hash (md5)"
|
||||||
exif: "EXIF"
|
exif: "EXIF"
|
||||||
mobile/views/components/media-image.vue:
|
mobile/views/components/media-image.vue:
|
||||||
sensitive: "閲覧注意"
|
sensitive: "To jest zawartość NSFW"
|
||||||
click-to-show: "クリックして表示"
|
click-to-show: "Naciśnij aby wyświetlić"
|
||||||
mobile/views/components/media-video.vue:
|
mobile/views/components/media-video.vue:
|
||||||
sensitive: "閲覧注意"
|
sensitive: "To jest zawartość NSFW"
|
||||||
click-to-show: "クリックして表示"
|
click-to-show: "Naciśnij aby wyświetlić"
|
||||||
mobile/views/components/follow-button.vue:
|
mobile/views/components/follow-button.vue:
|
||||||
following: "Śledzisz"
|
following: "Śledzisz"
|
||||||
follow: "Śledź"
|
follow: "Śledź"
|
||||||
@ -951,14 +951,14 @@ docs:
|
|||||||
properties: "Właściwości"
|
properties: "Właściwości"
|
||||||
endpoints:
|
endpoints:
|
||||||
params: "Parametry"
|
params: "Parametry"
|
||||||
no-params: "パラメータはありません"
|
no-params: "Brak parametrów."
|
||||||
res: "Odpowiedź"
|
res: "Odpowiedź"
|
||||||
require-credential: "このエンドポイントは認証情報が必須です。"
|
require-credential: "Punkt końcowy wymaga informacji o uwierzytelnieniu."
|
||||||
require-permission: "このエンドポイントは{permission}の権限を必要とします。"
|
require-permission: "Ten punkt końcowy wymaga uprawnienia {permission}."
|
||||||
has-limit: "レートリミットがあります。"
|
has-limit: "Istnieje limit częstotliwości."
|
||||||
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
duration-limit: "直近{duration}ミリ秒の間のこのエンドポイントへのリクエスト数の合計が{max}を超える場合はリクエストできません。"
|
||||||
min-interval-limit: "前回のリクエストから{interval}ミリ秒経っていない場合はリクエストできません。"
|
min-interval-limit: "Nie możesz wykonać żądania przed upłynięciem {interval} od ostatniego żądania."
|
||||||
show-src: "このエンドポイントのソースコードも閲覧できます。"
|
show-src: "Możesz zobaczyć kod źródłowy tego punktu końcowego."
|
||||||
show-src-link: "Zobacz kod na GitHubie"
|
show-src-link: "Zobacz kod na GitHubie"
|
||||||
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
generated: "このドキュメントはAPI定義に基づき自動生成されています。"
|
||||||
props:
|
props:
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "5.0.0",
|
"version": "5.1.0",
|
||||||
"clientVersion": "1.0.7553",
|
"clientVersion": "1.0.7561",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
@ -55,7 +55,6 @@
|
|||||||
"@types/koa-send": "4.1.1",
|
"@types/koa-send": "4.1.1",
|
||||||
"@types/koa-views": "2.0.3",
|
"@types/koa-views": "2.0.3",
|
||||||
"@types/koa__cors": "2.2.2",
|
"@types/koa__cors": "2.2.2",
|
||||||
"@types/kue": "0.11.9",
|
|
||||||
"@types/minio": "6.0.2",
|
"@types/minio": "6.0.2",
|
||||||
"@types/mkdirp": "0.5.2",
|
"@types/mkdirp": "0.5.2",
|
||||||
"@types/mocha": "5.2.3",
|
"@types/mocha": "5.2.3",
|
||||||
@ -86,6 +85,7 @@
|
|||||||
"autosize": "4.0.2",
|
"autosize": "4.0.2",
|
||||||
"autwh": "0.1.0",
|
"autwh": "0.1.0",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
|
"bee-queue": "1.2.2",
|
||||||
"bootstrap-vue": "2.0.0-rc.11",
|
"bootstrap-vue": "2.0.0-rc.11",
|
||||||
"cafy": "11.3.0",
|
"cafy": "11.3.0",
|
||||||
"chalk": "2.4.1",
|
"chalk": "2.4.1",
|
||||||
@ -144,7 +144,6 @@
|
|||||||
"koa-send": "5.0.0",
|
"koa-send": "5.0.0",
|
||||||
"koa-slow": "2.1.0",
|
"koa-slow": "2.1.0",
|
||||||
"koa-views": "6.1.4",
|
"koa-views": "6.1.4",
|
||||||
"kue": "0.11.6",
|
|
||||||
"loader-utils": "1.1.0",
|
"loader-utils": "1.1.0",
|
||||||
"mecab-async": "0.1.2",
|
"mecab-async": "0.1.2",
|
||||||
"minio": "6.0.0",
|
"minio": "6.0.0",
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
<iframe v-if="youtubeId" type="text/html" height="250"
|
<iframe v-if="youtubeId" type="text/html" height="250"
|
||||||
:src="`https://www.youtube.com/embed/${youtubeId}?origin=${misskeyUrl}`"
|
:src="`https://www.youtube.com/embed/${youtubeId}?origin=${misskeyUrl}`"
|
||||||
frameborder="0"/>
|
frameborder="0"/>
|
||||||
<blockquote v-else-if="tweetUrl" class="twitter-tweet" ref="tweet">
|
<div v-else-if="tweetUrl && detail" class="twitter">
|
||||||
<a :href="url"></a>
|
<blockquote ref="tweet" class="twitter-tweet" :data-theme="$store.state.device.darkmode ? 'dark' : null">
|
||||||
</blockquote>
|
<a :href="url"></a>
|
||||||
|
</blockquote>
|
||||||
|
</div>
|
||||||
<div v-else class="mk-url-preview">
|
<div v-else class="mk-url-preview">
|
||||||
<a :href="url" target="_blank" :title="url" v-if="!fetching">
|
<a :href="url" target="_blank" :title="url" v-if="!fetching">
|
||||||
<div class="thumbnail" v-if="thumbnail" :style="`background-image: url(${thumbnail})`"></div>
|
<div class="thumbnail" v-if="thumbnail" :style="`background-image: url(${thumbnail})`"></div>
|
||||||
@ -27,7 +29,17 @@ import Vue from 'vue';
|
|||||||
import { url as misskeyUrl } from '../../../config';
|
import { url as misskeyUrl } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['url'],
|
props: {
|
||||||
|
url: {
|
||||||
|
type: String,
|
||||||
|
require: true
|
||||||
|
},
|
||||||
|
detail: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fetching: true,
|
fetching: true,
|
||||||
@ -48,7 +60,7 @@ export default Vue.extend({
|
|||||||
this.youtubeId = url.searchParams.get('v');
|
this.youtubeId = url.searchParams.get('v');
|
||||||
} else if (url.hostname == 'youtu.be') {
|
} else if (url.hostname == 'youtu.be') {
|
||||||
this.youtubeId = url.pathname;
|
this.youtubeId = url.pathname;
|
||||||
} else if (url.hostname == 'twitter.com' && /^\/.+\/status(es)?\/\d+/.test(url.pathname)) {
|
} else if (this.detail && url.hostname == 'twitter.com' && /^\/.+\/status(es)?\/\d+/.test(url.pathname)) {
|
||||||
this.tweetUrl = url;
|
this.tweetUrl = url;
|
||||||
const twttr = (window as any).twttr || {};
|
const twttr = (window as any).twttr || {};
|
||||||
const loadTweet = () => twttr.widgets.load(this.$refs.tweet);
|
const loadTweet = () => twttr.widgets.load(this.$refs.tweet);
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<mk-media-list :media-list="p.media" :raw="true"/>
|
<mk-media-list :media-list="p.media" :raw="true"/>
|
||||||
</div>
|
</div>
|
||||||
<mk-poll v-if="p.poll" :note="p"/>
|
<mk-poll v-if="p.poll" :note="p"/>
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
|
||||||
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
||||||
<div class="map" v-if="p.geo" ref="map"></div>
|
<div class="map" v-if="p.geo" ref="map"></div>
|
||||||
<div class="renote" v-if="p.renote">
|
<div class="renote" v-if="p.renote">
|
||||||
|
@ -84,12 +84,11 @@ export default Vue.extend({
|
|||||||
(this as any).os.new(MkGameWindow);
|
(this as any).os.new(MkGameWindow);
|
||||||
},
|
},
|
||||||
|
|
||||||
goToTop(e: HTMLElement) {
|
goToTop() {
|
||||||
if (e.classList.contains('active'))
|
window.scrollTo({
|
||||||
window.scrollTo({
|
top: 0,
|
||||||
top: 0,
|
behavior: 'smooth'
|
||||||
behavior: 'smooth'
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -45,14 +45,7 @@ export default Vue.extend({
|
|||||||
XPost,
|
XPost,
|
||||||
XClock,
|
XClock,
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
goToTop() {
|
|
||||||
window.scrollTo({
|
|
||||||
top: 0,
|
|
||||||
behavior: 'smooth'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$store.commit('setUiHeaderHeight', 48);
|
this.$store.commit('setUiHeaderHeight', 48);
|
||||||
|
|
||||||
@ -104,7 +97,16 @@ export default Vue.extend({
|
|||||||
}, 2500);
|
}, 2500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
goToTop() {
|
||||||
|
window.scrollTo({
|
||||||
|
top: 0,
|
||||||
|
behavior: 'smooth'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<mk-media-list :media-list="p.media" :raw="true"/>
|
<mk-media-list :media-list="p.media" :raw="true"/>
|
||||||
</div>
|
</div>
|
||||||
<mk-poll v-if="p.poll" :note="p"/>
|
<mk-poll v-if="p.poll" :note="p"/>
|
||||||
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
|
||||||
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
|
||||||
<div class="map" v-if="p.geo" ref="map"></div>
|
<div class="map" v-if="p.geo" ref="map"></div>
|
||||||
<div class="renote" v-if="p.renote">
|
<div class="renote" v-if="p.renote">
|
||||||
|
@ -31,9 +31,6 @@ if (process.env.NODE_ENV != 'production') {
|
|||||||
process.env.DEBUG = 'misskey:*';
|
process.env.DEBUG = 'misskey:*';
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/Automattic/kue/issues/822
|
|
||||||
require('events').EventEmitter.prototype._maxListeners = 512;
|
|
||||||
|
|
||||||
// Start app
|
// Start app
|
||||||
main();
|
main();
|
||||||
|
|
||||||
|
@ -1,45 +1,36 @@
|
|||||||
import { createQueue } from 'kue';
|
import * as Queue from 'bee-queue';
|
||||||
|
|
||||||
import config from '../config';
|
import config from '../config';
|
||||||
import http from './processors/http';
|
import http from './processors/http';
|
||||||
import { ILocalUser } from '../models/user';
|
import { ILocalUser } from '../models/user';
|
||||||
|
|
||||||
const queue = createQueue({
|
const queue = new Queue('misskey', {
|
||||||
redis: {
|
redis: {
|
||||||
port: config.redis.port,
|
port: config.redis.port,
|
||||||
host: config.redis.host,
|
host: config.redis.host,
|
||||||
auth: config.redis.pass
|
password: config.redis.pass
|
||||||
}
|
},
|
||||||
|
|
||||||
|
removeOnSuccess: true,
|
||||||
|
removeOnFailure: true
|
||||||
});
|
});
|
||||||
|
|
||||||
export function createHttp(data: any) {
|
export function createHttpJob(data: any) {
|
||||||
return queue
|
return queue.createJob(data)
|
||||||
.create('http', data)
|
.retries(4)
|
||||||
.removeOnComplete(true)
|
.backoff('exponential', 16384) // 16s
|
||||||
.events(false)
|
.save();
|
||||||
.attempts(8)
|
|
||||||
.backoff({ delay: 16384, type: 'exponential' });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deliver(user: ILocalUser, content: any, to: any) {
|
export function deliver(user: ILocalUser, content: any, to: any) {
|
||||||
createHttp({
|
createHttpJob({
|
||||||
title: 'deliver',
|
|
||||||
type: 'deliver',
|
type: 'deliver',
|
||||||
user,
|
user,
|
||||||
content,
|
content,
|
||||||
to
|
to
|
||||||
}).save();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function() {
|
export default function() {
|
||||||
/*
|
queue.process(8, http);
|
||||||
256 is the default concurrency limit of Mozilla Firefox and Google
|
|
||||||
Chromium.
|
|
||||||
a8af215e691f3a2205a3758d2d96e9d328e100ff - chromium/src.git - Git at Google
|
|
||||||
https://chromium.googlesource.com/chromium/src.git/+/a8af215e691f3a2205a3758d2d96e9d328e100ff
|
|
||||||
Network.http.max-connections - MozillaZine Knowledge Base
|
|
||||||
http://kb.mozillazine.org/Network.http.max-connections
|
|
||||||
*/
|
|
||||||
//queue.process('http', 256, http);
|
|
||||||
queue.process('http', 128, http);
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import * as kue from 'kue';
|
import * as bq from 'bee-queue';
|
||||||
|
|
||||||
import request from '../../../remote/activitypub/request';
|
import request from '../../../remote/activitypub/request';
|
||||||
|
|
||||||
export default async (job: kue.Job, done: any): Promise<void> => {
|
export default async (job: bq.Job, done: any): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
await request(job.data.user, job.data.to, job.data.content);
|
await request(job.data.user, job.data.to, job.data.content);
|
||||||
done();
|
done();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as kue from 'kue';
|
import * as bq from 'bee-queue';
|
||||||
import * as debug from 'debug';
|
import * as debug from 'debug';
|
||||||
|
|
||||||
const httpSignature = require('http-signature');
|
const httpSignature = require('http-signature');
|
||||||
@ -10,7 +10,7 @@ import { resolvePerson } from '../../../remote/activitypub/models/person';
|
|||||||
const log = debug('misskey:queue:inbox');
|
const log = debug('misskey:queue:inbox');
|
||||||
|
|
||||||
// ユーザーのinboxにアクティビティが届いた時の処理
|
// ユーザーのinboxにアクティビティが届いた時の処理
|
||||||
export default async (job: kue.Job, done: any): Promise<void> => {
|
export default async (job: bq.Job, done: any): Promise<void> => {
|
||||||
const signature = job.data.signature;
|
const signature = job.data.signature;
|
||||||
const activity = job.data.activity;
|
const activity = job.data.activity;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import * as Router from 'koa-router';
|
|||||||
const json = require('koa-json-body');
|
const json = require('koa-json-body');
|
||||||
const httpSignature = require('http-signature');
|
const httpSignature = require('http-signature');
|
||||||
|
|
||||||
import { createHttp } from '../queue';
|
import { createHttpJob } from '../queue';
|
||||||
import pack from '../remote/activitypub/renderer';
|
import pack from '../remote/activitypub/renderer';
|
||||||
import Note from '../models/note';
|
import Note from '../models/note';
|
||||||
import User, { isLocalUser, ILocalUser, IUser } from '../models/user';
|
import User, { isLocalUser, ILocalUser, IUser } from '../models/user';
|
||||||
@ -30,11 +30,11 @@ function inbox(ctx: Router.IRouterContext) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
createHttp({
|
createHttpJob({
|
||||||
type: 'processInbox',
|
type: 'processInbox',
|
||||||
activity: ctx.request.body,
|
activity: ctx.request.body,
|
||||||
signature
|
signature
|
||||||
}).save();
|
});
|
||||||
|
|
||||||
ctx.status = 202;
|
ctx.status = 202;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user