1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add SQL query support in plugins

This commit is contained in:
Chocobozzz 2020-04-09 11:00:30 +02:00
parent bc0d801bb7
commit 1b05d82d86
No known key found for this signature in database
GPG key ID: 583A612D890159BE
10 changed files with 110 additions and 9 deletions

View file

@ -285,7 +285,7 @@ function cleanupTests (servers: ServerInfo[]) {
return Promise.all(p)
}
async function waitUntilLog (server: ServerInfo, str: string, count = 1) {
async function waitUntilLog (server: ServerInfo, str: string, count = 1, strictCount = true) {
const logfile = join(root(), 'test' + server.internalServerNumber, 'logs/peertube.log')
while (true) {
@ -293,6 +293,7 @@ async function waitUntilLog (server: ServerInfo, str: string, count = 1) {
const matches = buf.toString().match(new RegExp(str, 'g'))
if (matches && matches.length === count) return
if (matches && strictCount === false && matches.length >= count) return
await wait(1000)
}