fix(celery): Reset DB connection pools for forked worker processes (#13350)

* Reset sqlalchemy connection pool on celery process fork

* Fix race condition with async chart loading state

* pylint: ignore

* prettier
This commit is contained in:
Rob DiCiuccio
2021-02-26 08:05:40 -08:00
committed by GitHub
parent 1697e1e3b1
commit b4ca39ceeb
4 changed files with 22 additions and 6 deletions

View File

@@ -40,7 +40,9 @@ const initState = getInitialState(bootstrapData);
const asyncEventMiddleware = initAsyncEvents({
config: bootstrapData.common.conf,
getPendingComponents: ({ charts }) =>
Object.values(charts).filter(c => c.chartStatus === 'loading'),
Object.values(charts).filter(
c => c.chartStatus === 'loading' && c.asyncJobId !== undefined,
),
successAction: (componentId, componentData) =>
actions.chartUpdateSucceeded(componentData, componentId),
errorAction: (componentId, response) =>