@sentio/runtime 2.59.0-rc.33 → 2.59.0-rc.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
- "version": "2.59.0-rc.33",
3
+ "version": "2.59.0-rc.34",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -12,6 +12,7 @@ import {
12
12
  ProcessResult,
13
13
  ProcessStreamRequest,
14
14
  ProcessStreamResponse,
15
+ ProcessStreamResponse_Partitions,
15
16
  StartRequest
16
17
  } from '@sentio/protos'
17
18
 
@@ -119,22 +120,15 @@ export class ServiceManager extends ProcessorServiceImpl {
119
120
  }
120
121
  }
121
122
 
122
- private async doPartition(
123
- processId: number,
124
- binding: DataBinding,
125
- subject: Subject<DeepPartial<ProcessStreamResponse>>
126
- ) {
127
- if (!this.pool) {
128
- await this.initPool()
129
- }
123
+ private doPartition(processId: number, binding: DataBinding, subject: Subject<DeepPartial<ProcessStreamResponse>>) {
130
124
  const dbContext = this.contexts.new(processId, subject)
131
125
  const start = Date.now()
132
126
 
133
127
  this.process(binding, processId, dbContext, true)
134
- .then(async (result) => {
128
+ .then(async (partitions) => {
135
129
  console.debug('partition', processId, 'finished, took:', Date.now() - start)
136
130
  subject.next({
137
- result,
131
+ partitions: partitions as ProcessStreamResponse_Partitions,
138
132
  processId: processId
139
133
  })
140
134
  })
@@ -158,7 +152,7 @@ export class ServiceManager extends ProcessorServiceImpl {
158
152
  .then(async (result) => {
159
153
  console.debug('process', processId, 'finished, took:', Date.now() - start)
160
154
  subject.next({
161
- result,
155
+ result: result as ProcessResult,
162
156
  processId: processId
163
157
  })
164
158
  })
@@ -179,7 +173,7 @@ export class ServiceManager extends ProcessorServiceImpl {
179
173
  processId: number,
180
174
  dbContext?: ChannelStoreContext,
181
175
  partition: boolean = false
182
- ): Promise<ProcessResult> {
176
+ ): Promise<ProcessResult | ProcessStreamResponse_Partitions> {
183
177
  if (!this.pool) {
184
178
  await this.initPool()
185
179
  }