refactor: rename runWorkflow to createWorkflowAndStoreMetadata
This commit is contained in:
@@ -9,7 +9,7 @@ import Robot from "../../models/Robot";
|
||||
import Run from "../../models/Run";
|
||||
import { getDecryptedProxyConfig } from "../../routes/proxy";
|
||||
|
||||
async function runWorkflow(id: string, userId: string) {
|
||||
async function createWorkflowAndStoreMetadata(id: string, userId: string) {
|
||||
if (!id) {
|
||||
id = uuid();
|
||||
}
|
||||
@@ -171,7 +171,7 @@ function resetRecordingState(browserId: string, id: string) {
|
||||
|
||||
export async function handleRunRecording(id: string, userId: string) {
|
||||
try {
|
||||
const result = await runWorkflow(id, userId);
|
||||
const result = await createWorkflowAndStoreMetadata(id, userId);
|
||||
const { browserId, runId: newRunId } = result;
|
||||
|
||||
if (!browserId || !newRunId || !userId) {
|
||||
@@ -201,4 +201,4 @@ function cleanupSocketListeners(socket: Socket, browserId: string, id: string) {
|
||||
logger.log('info', `Cleaned up listeners for browserId: ${browserId}, runId: ${id}`);
|
||||
}
|
||||
|
||||
export { runWorkflow };
|
||||
export { createWorkflowAndStoreMetadata };
|
||||
Reference in New Issue
Block a user