Skip to content

Commit 0e31f1d

Browse files
committed
Refactor BackendsService to optimize payload handling
1 parent 4755827 commit 0e31f1d

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/core/backends/backends.service.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,10 @@ export class BackendsService extends AbstractQueueProcessor {
174174

175175
const result = {};
176176
for (const identity of identities) {
177-
const [executedJob] = await this.executeJob(
178-
identity.action,
179-
identity.identity._id,
180-
{ identity },
181-
{
182-
...options,
183-
task: task._id,
184-
},
185-
);
177+
const [executedJob] = await this.executeJob(identity.action, identity.identity._id, identity.identity, {
178+
...options,
179+
task: task._id,
180+
});
186181
result[identity.identity._id] = executedJob;
187182
}
188183
return result;
@@ -198,8 +193,8 @@ export class BackendsService extends AbstractQueueProcessor {
198193
const job = await this.queue.add(
199194
actionType,
200195
{
201-
...payload,
202196
concernedTo,
197+
payload,
203198
},
204199
options?.job,
205200
);

0 commit comments

Comments
 (0)