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 Run from "../../models/Run";
|
||||||
import { getDecryptedProxyConfig } from "../../routes/proxy";
|
import { getDecryptedProxyConfig } from "../../routes/proxy";
|
||||||
|
|
||||||
async function runWorkflow(id: string, userId: string) {
|
async function createWorkflowAndStoreMetadata(id: string, userId: string) {
|
||||||
if (!id) {
|
if (!id) {
|
||||||
id = uuid();
|
id = uuid();
|
||||||
}
|
}
|
||||||
@@ -171,7 +171,7 @@ function resetRecordingState(browserId: string, id: string) {
|
|||||||
|
|
||||||
export async function handleRunRecording(id: string, userId: string) {
|
export async function handleRunRecording(id: string, userId: string) {
|
||||||
try {
|
try {
|
||||||
const result = await runWorkflow(id, userId);
|
const result = await createWorkflowAndStoreMetadata(id, userId);
|
||||||
const { browserId, runId: newRunId } = result;
|
const { browserId, runId: newRunId } = result;
|
||||||
|
|
||||||
if (!browserId || !newRunId || !userId) {
|
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}`);
|
logger.log('info', `Cleaned up listeners for browserId: ${browserId}, runId: ${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { runWorkflow };
|
export { createWorkflowAndStoreMetadata };
|
||||||
Reference in New Issue
Block a user