Safer ffmpeg kill, POST process/service actions, ARM encoder from hardware.env, filter_threads scaling
Made-with: Cursor
This commit is contained in:
@@ -480,9 +480,11 @@ export default function Home() {
|
||||
if (!currentProcess) return;
|
||||
setBusy(`process:${action}`);
|
||||
try {
|
||||
const data = await fetchJson<ProcessStatusResponse>(
|
||||
`/${action}?process=${encodeURIComponent(currentProcess)}`,
|
||||
);
|
||||
const data = await fetchJson<ProcessStatusResponse>(`/${action}`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ process: currentProcess }),
|
||||
});
|
||||
notify(String(data.output || data.pm2_output || data.message || "OK"));
|
||||
await refreshProcess();
|
||||
} catch (reason) {
|
||||
@@ -495,9 +497,11 @@ export default function Home() {
|
||||
const serviceAction = async (serviceId: string, action: "start" | "restart" | "stop") => {
|
||||
setBusy(`${serviceId}:${action}`);
|
||||
try {
|
||||
const data = await fetchJson<ServiceItem>(
|
||||
`/service_action?service=${encodeURIComponent(serviceId)}&action=${encodeURIComponent(action)}`,
|
||||
);
|
||||
const data = await fetchJson<ServiceItem>("/service_action", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ service: serviceId, action }),
|
||||
});
|
||||
notify(data.message || "OK");
|
||||
await refreshServices();
|
||||
} catch (reason) {
|
||||
|
||||
Reference in New Issue
Block a user