@naturalcycles/datastore-lib 4.18.4 → 4.18.5
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.
|
@@ -79,7 +79,7 @@ export class DatastoreStreamReadable extends Readable {
|
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
if (this.paused) {
|
|
82
|
-
this.logger.
|
|
82
|
+
this.logger.debug(`_read #${this.countReads}, queryIsRunning: ${this.queryIsRunning}, unpausing stream`);
|
|
83
83
|
this.paused = false;
|
|
84
84
|
}
|
|
85
85
|
if (this.queryIsRunning) {
|
|
@@ -118,7 +118,7 @@ export class DatastoreStreamReadable extends Readable {
|
|
|
118
118
|
const rows = res[0];
|
|
119
119
|
const info = res[1];
|
|
120
120
|
this.rowsRetrieved += rows.length;
|
|
121
|
-
logger.
|
|
121
|
+
logger.debug(`${table} got ${rows.length} rows in ${_ms(queryTook)}, ${this.rowsRetrieved} rowsRetrieved, totalWait: ${_ms(this.totalWait)}`);
|
|
122
122
|
this.endCursor = info.endCursor;
|
|
123
123
|
this.queryIsRunning = false; // ready to take more _reads
|
|
124
124
|
this.lastQueryDone = Date.now();
|
|
@@ -147,7 +147,7 @@ export class DatastoreStreamReadable extends Readable {
|
|
|
147
147
|
logger.debug(`${table} stream is already paused`);
|
|
148
148
|
}
|
|
149
149
|
else {
|
|
150
|
-
logger.
|
|
150
|
+
logger.debug(`${table} pausing the stream`);
|
|
151
151
|
this.paused = true;
|
|
152
152
|
}
|
|
153
153
|
}
|
package/package.json
CHANGED
|
@@ -108,7 +108,7 @@ export class DatastoreStreamReadable<T = any> extends Readable implements Readab
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
if (this.paused) {
|
|
111
|
-
this.logger.
|
|
111
|
+
this.logger.debug(
|
|
112
112
|
`_read #${this.countReads}, queryIsRunning: ${this.queryIsRunning}, unpausing stream`,
|
|
113
113
|
)
|
|
114
114
|
this.paused = false
|
|
@@ -158,7 +158,7 @@ export class DatastoreStreamReadable<T = any> extends Readable implements Readab
|
|
|
158
158
|
const info: RunQueryInfo = res[1]
|
|
159
159
|
|
|
160
160
|
this.rowsRetrieved += rows.length
|
|
161
|
-
logger.
|
|
161
|
+
logger.debug(
|
|
162
162
|
`${table} got ${rows.length} rows in ${_ms(queryTook)}, ${this.rowsRetrieved} rowsRetrieved, totalWait: ${_ms(
|
|
163
163
|
this.totalWait,
|
|
164
164
|
)}`,
|
|
@@ -197,7 +197,7 @@ export class DatastoreStreamReadable<T = any> extends Readable implements Readab
|
|
|
197
197
|
if (this.paused) {
|
|
198
198
|
logger.debug(`${table} stream is already paused`)
|
|
199
199
|
} else {
|
|
200
|
-
logger.
|
|
200
|
+
logger.debug(`${table} pausing the stream`)
|
|
201
201
|
this.paused = true
|
|
202
202
|
}
|
|
203
203
|
}
|