998 workflow restore (#12417)
Add a post hook to restore workflow sub-entities
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
import { Milliseconds } from 'cache-manager';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
import { NodeEnvironment } from 'src/engine/core-modules/twenty-config/interfaces/node-environment.interface';
|
||||
|
||||
import { CacheKey } from 'src/engine/twenty-orm/storage/types/cache-key.type';
|
||||
|
||||
type AsyncFactoryCallback<T> = () => Promise<T | null>;
|
||||
@ -37,10 +39,12 @@ export class PromiseMemoizer<T> {
|
||||
return existingPromise;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
`Computing new Datasource for cacheKey: ${cacheKey} out of ${this.cache.size}`,
|
||||
);
|
||||
if (process.env.NODE_ENV !== NodeEnvironment.TEST) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
`Computing new Datasource for cacheKey: ${cacheKey} out of ${this.cache.size}`,
|
||||
);
|
||||
}
|
||||
|
||||
const newPromise = (async () => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user