aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/request/request-scheduler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/request/request-scheduler.ts')
-rw-r--r--server/lib/request/request-scheduler.ts9
1 files changed, 1 insertions, 8 deletions
diff --git a/server/lib/request/request-scheduler.ts b/server/lib/request/request-scheduler.ts
index 0dd796fb0..8927d53bb 100644
--- a/server/lib/request/request-scheduler.ts
+++ b/server/lib/request/request-scheduler.ts
@@ -61,16 +61,9 @@ class RequestScheduler extends AbstractRequestScheduler<RequestsGrouped> {
61 } 61 }
62 62
63 createRequest ({ type, endpoint, data, toIds, transaction }: RequestSchedulerOptions) { 63 createRequest ({ type, endpoint, data, toIds, transaction }: RequestSchedulerOptions) {
64 // TODO: check the setPods works
65 const podIds = []
66
67 // If there are no destination pods abort 64 // If there are no destination pods abort
68 if (toIds.length === 0) return undefined 65 if (toIds.length === 0) return undefined
69 66
70 toIds.forEach(toPod => {
71 podIds.push(toPod)
72 })
73
74 const createQuery = { 67 const createQuery = {
75 endpoint, 68 endpoint,
76 request: { 69 request: {
@@ -85,7 +78,7 @@ class RequestScheduler extends AbstractRequestScheduler<RequestsGrouped> {
85 78
86 return db.Request.create(createQuery, dbRequestOptions) 79 return db.Request.create(createQuery, dbRequestOptions)
87 .then(request => { 80 .then(request => {
88 return request.setPods(podIds, dbRequestOptions) 81 return request.setPods(toIds, dbRequestOptions)
89 }) 82 })
90 } 83 }
91 84