Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tiina303 committed Jan 3, 2024
1 parent 8de2139 commit 0e920c5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions plugin-server/src/capabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function getPluginServerCapabilities(config: PluginsServerConfig): Plugin
processAsyncWebhooksHandlers: true,
sessionRecordingBlobIngestion: true,
personOverrides: config.POE_DEFERRED_WRITES_ENABLED,
transpileFrontendApps: true,
appManagementSingleton: true,
preflightSchedules: true,
...sharedCapabilities,
}
Expand Down Expand Up @@ -73,7 +73,7 @@ export function getPluginServerCapabilities(config: PluginsServerConfig): Plugin
case PluginServerMode.scheduler:
return {
pluginScheduledTasks: true,
transpileFrontendApps: true, // TODO: move this away from pod startup, into a graphile job
appManagementSingleton: true,
...sharedCapabilities,
}
case PluginServerMode.person_overrides:
Expand Down
2 changes: 1 addition & 1 deletion plugin-server/src/main/pluginsServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export async function startPluginsServer(
},
'populate-plugin-capabilities': async (message) => {
// We need this to be done in only once
if (hub?.capabilities.pluginScheduledTasks && piscina) {
if (hub?.capabilities.appManagementSingleton && piscina) {
await piscina?.broadcastTask({ task: 'populatePluginCapabilities', args: JSON.parse(message) })
}
},
Expand Down
2 changes: 1 addition & 1 deletion plugin-server/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export interface PluginServerCapabilities {
processAsyncWebhooksHandlers?: boolean
sessionRecordingBlobIngestion?: boolean
personOverrides?: boolean
transpileFrontendApps?: boolean // TODO: move this away from pod startup, into a graphile job
appManagementSingleton?: boolean
preflightSchedules?: boolean // Used for instance health checks on hobby deploy, not useful on cloud
http?: boolean
mmdb?: boolean
Expand Down
5 changes: 0 additions & 5 deletions plugin-server/src/utils/db/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ export async function getPlugin(hub: Hub, pluginId: number): Promise<Plugin | un
export async function getPluginRows(hub: Hub): Promise<Plugin[]> {
const { rows }: { rows: Plugin[] } = await hub.db.postgres.query(
PostgresUse.COMMON_READ,
// `posthog_plugin` columns have to be listed individually, as we want to exclude a few columns
// and Postgres syntax unfortunately doesn't have a column exclusion feature. The excluded columns are:
// - archive - this is a potentially large blob, only extracted in Django as a plugin server optimization
// - latest_tag - not used in this service
// - latest_tag_checked_at - not used in this service
`${PLUGIN_SELECT}
WHERE posthog_plugin.id IN (${pluginConfigsInForceQuery('plugin_id')}
GROUP BY posthog_pluginconfig.plugin_id)`,
Expand Down

0 comments on commit 0e920c5

Please sign in to comment.