admin: kill go-vod when changing config

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-04-10 14:37:56 -07:00
parent 31a37deda2
commit cb8ebcb6a8
1 changed files with 6 additions and 0 deletions

View File

@ -87,8 +87,14 @@ class OtherController extends GenericApiController
throw Exceptions::Forbidden('Cannot change settings in readonly mode');
}
// Assign config with type checking
Util::setSystemConfig($key, $value);
// If changing vod settings, kill any running go-vod instances
if (0 === strpos($key, 'memories.vod.')) {
Util::pkill('go-vod');
}
return new JSONResponse([], Http::STATUS_OK);
});
}