feat: init proxy setup for recording
This commit is contained in:
@@ -35,6 +35,11 @@ router.get('/start', (req, res) => {
|
||||
browser: chromium,
|
||||
launchOptions: {
|
||||
headless: true,
|
||||
proxy: {
|
||||
server: '',
|
||||
username: '',
|
||||
password: '',
|
||||
}
|
||||
}
|
||||
});
|
||||
return res.send(id);
|
||||
|
||||
@@ -10,7 +10,7 @@ import { chromium } from "playwright";
|
||||
import { browserPool } from "../server";
|
||||
import fs from "fs";
|
||||
import { uuid } from "uuidv4";
|
||||
import { workflowQueue } from '../workflow-management/scheduler';
|
||||
// import { workflowQueue } from '../workflow-management/scheduler';
|
||||
import moment from 'moment-timezone';
|
||||
import cron from 'node-cron';
|
||||
import { googleSheetUpdateTasks, processGoogleSheetUpdates } from '../workflow-management/integrations/gsheet';
|
||||
@@ -87,7 +87,14 @@ router.put('/runs/:fileName', async (req, res) => {
|
||||
try {
|
||||
const id = createRemoteBrowserForRun({
|
||||
browser: chromium,
|
||||
launchOptions: { headless: true }
|
||||
launchOptions: {
|
||||
headless: true,
|
||||
proxy: {
|
||||
server: '',
|
||||
username: '',
|
||||
password: '',
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const runId = uuid();
|
||||
@@ -262,16 +269,16 @@ router.put('/schedule/:fileName/', async (req, res) => {
|
||||
|
||||
const runId = uuid();
|
||||
|
||||
await workflowQueue.add(
|
||||
'run workflow',
|
||||
{ fileName, runId },
|
||||
{
|
||||
repeat: {
|
||||
pattern: cronExpression,
|
||||
tz: timezone
|
||||
}
|
||||
}
|
||||
);
|
||||
// await workflowQueue.add(
|
||||
// 'run workflow',
|
||||
// { fileName, runId },
|
||||
// {
|
||||
// repeat: {
|
||||
// pattern: cronExpression,
|
||||
// tz: timezone
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
|
||||
res.status(200).json({
|
||||
message: 'success',
|
||||
|
||||
Reference in New Issue
Block a user