Skip to content

Commit

Permalink
use rpc mode for preview
Browse files Browse the repository at this point in the history
  • Loading branch information
touv committed Nov 7, 2024
1 parent 91ba41d commit 9f1090c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/api/services/enrichment/enrichment.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,13 @@ async function postcheck(data, feed) {
const processEzsEnrichment = (entries, commands, ctx, preview = false) => {
return new Promise((resolve, reject) => {
const values = [];
const server = String(
process.env.WORKERS_URL || 'http://localhost:31976',
).replace('http://', '');
const mode = preview ? 'dispatch' : 'delegate';
from(entries)
.pipe(ezs(preformat))
.pipe(ezs('delegate', { commands }, {}))
.pipe(ezs(mode, { commands, server }, {}))
.pipe(ezs(postcheck, { preview }, ctx))
.on('data', (data) => {
if (data instanceof Error) {
Expand Down

0 comments on commit 9f1090c

Please sign in to comment.