@naturalcycles/firestore-lib 2.14.0 → 2.14.2
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.
|
@@ -53,7 +53,7 @@ export class FirestoreShardedReadable extends Readable {
|
|
|
53
53
|
// console.log(`_read called ${++this.count}, wasRunning: ${this.running}`) // debugging
|
|
54
54
|
this.count++;
|
|
55
55
|
if (this.done) {
|
|
56
|
-
this.logger.log(`!!! _read was called, but done==true`);
|
|
56
|
+
this.logger.log(`!!! ${this.table} _read was called, but done==true`);
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
// const shard = this.getNextShardAndMove()
|
|
@@ -49,11 +49,11 @@ export class FirestoreStreamReadable extends Readable {
|
|
|
49
49
|
// console.log(`_read called ${++this.count}, wasRunning: ${this.running}`) // debugging
|
|
50
50
|
this.countReads++;
|
|
51
51
|
if (this.done) {
|
|
52
|
-
this.logger.warn(`!!! _read was called, but done==true`);
|
|
52
|
+
this.logger.warn(`!!! ${this.table} _read was called, but done==true`);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
55
|
if (this.paused) {
|
|
56
|
-
this.logger.
|
|
56
|
+
this.logger.debug(`_read #${this.countReads}, queryIsRunning: ${this.queryIsRunning}, unpausing stream`);
|
|
57
57
|
this.paused = false;
|
|
58
58
|
}
|
|
59
59
|
if (this.queryIsRunning) {
|
|
@@ -125,7 +125,7 @@ export class FirestoreStreamReadable extends Readable {
|
|
|
125
125
|
logger.debug(`${table} stream is already paused`);
|
|
126
126
|
}
|
|
127
127
|
else {
|
|
128
|
-
logger.
|
|
128
|
+
logger.debug(`${table} pausing the stream`);
|
|
129
129
|
this.paused = true;
|
|
130
130
|
}
|
|
131
131
|
}
|
package/package.json
CHANGED
|
@@ -72,12 +72,12 @@ export class FirestoreStreamReadable<T extends ObjectWithId = any>
|
|
|
72
72
|
this.countReads++
|
|
73
73
|
|
|
74
74
|
if (this.done) {
|
|
75
|
-
this.logger.warn(`!!! _read was called, but done==true`)
|
|
75
|
+
this.logger.warn(`!!! ${this.table} _read was called, but done==true`)
|
|
76
76
|
return
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
if (this.paused) {
|
|
80
|
-
this.logger.
|
|
80
|
+
this.logger.debug(
|
|
81
81
|
`_read #${this.countReads}, queryIsRunning: ${this.queryIsRunning}, unpausing stream`,
|
|
82
82
|
)
|
|
83
83
|
this.paused = false
|
|
@@ -166,7 +166,7 @@ export class FirestoreStreamReadable<T extends ObjectWithId = any>
|
|
|
166
166
|
if (this.paused) {
|
|
167
167
|
logger.debug(`${table} stream is already paused`)
|
|
168
168
|
} else {
|
|
169
|
-
logger.
|
|
169
|
+
logger.debug(`${table} pausing the stream`)
|
|
170
170
|
this.paused = true
|
|
171
171
|
}
|
|
172
172
|
}
|