Explorar o código

use isProcessable

yohei0125 %!s(int64=4) %!d(string=hai) anos
pai
achega
3c6b8bc554
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      packages/app/src/server/service/page.ts

+ 4 - 0
packages/app/src/server/service/page.ts

@@ -605,6 +605,10 @@ class PageService {
     if (pageOp == null) {
       throw Error('There is nothing to be processed right now');
     }
+    const isProcessable = await PageOperation.isProcessable(pageOp);
+    if (!isProcessable) {
+      throw Error('This page operation is currently being processed');
+    }
 
     const { page, toPath, options } = pageOp;