flowExecutionService 트랜잭션 처리 개선 및 데이터 변경 추적 로직 수정
This commit is contained in:
@@ -175,6 +175,12 @@ export class NodeFlowExecutionService {
|
||||
|
||||
try {
|
||||
result = await transaction(async (client) => {
|
||||
// 🔥 사용자 ID 세션 변수 설정 (트리거용)
|
||||
const userId = context.buttonContext?.userId || "system";
|
||||
await client.query("SELECT set_config('app.user_id', $1, true)", [
|
||||
userId,
|
||||
]);
|
||||
|
||||
// 트랜잭션 내에서 레벨별 실행
|
||||
for (const level of levels) {
|
||||
await this.executeLevel(level, nodes, edges, context, client);
|
||||
|
||||
Reference in New Issue
Block a user