getPluginDirectories = async () => {
  const getDirs = async () => {
    const local_plugins = await Plugin.find({ source: "local" });
    return local_plugins.map((p) => p.location);
  };
  const listOfDirs = [];
  await eachTenant(async () => {
    listOfDirs.push(await getDirs());
  });
  return [...new Set(listOfDirs.flat(1))];
}
get all plugin directories that should trigger a server re-start
@returns {string[]} list of paths to relevant directories