fix: cleanup command

This commit is contained in:
Andras Bacsai 2022-08-10 12:41:25 +00:00
parent 2135efcb3f
commit 67f3bec9f1

View File

@ -2667,7 +2667,7 @@ export async function cleanupPlausibleLogs(request: FastifyRequest<OnlyId>, repl
if (destinationDockerId) {
await executeDockerCmd({
dockerId: destinationDocker.id,
command: `docker exec ${id}-clickhouse 'clickhouse-client -q "SELECT name FROM system.tables WHERE name LIKE '%log%';" | xargs -I{} clickhouse-client -q "TRUNCATE TABLE system.{};"'`
command: `docker exec ${id}-clickhouse clickhouse-client -q "SELECT name FROM system.tables WHERE name LIKE '%log%';" | xargs -I{} clickhouse-client -q "TRUNCATE TABLE system.{};"`
})
return await reply.code(201).send()
}