@tstdl/base 0.93.159 → 0.93.160
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/errors/custom.error.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -787,7 +787,7 @@ let PostgresTaskQueue = class PostgresTaskQueue extends TaskQueue {
|
|
|
787
787
|
if (isUndefined(updatedTask)) {
|
|
788
788
|
return;
|
|
789
789
|
}
|
|
790
|
-
if (updatedTask.status == TaskStatus.Completed) {
|
|
790
|
+
if (updatedTask.status == TaskStatus.Completed || updatedTask.status == TaskStatus.WaitingChildren) {
|
|
791
791
|
await this.#circuitBreaker.recordSuccess();
|
|
792
792
|
}
|
|
793
793
|
await this.resolveDependencies(task.id, updatedTask.status, { namespace: task.namespace, transaction: tx });
|
|
@@ -828,7 +828,7 @@ let PostgresTaskQueue = class PostgresTaskQueue extends TaskQueue {
|
|
|
828
828
|
.select({ id: updated.id, status: updated.status })
|
|
829
829
|
.from(updated);
|
|
830
830
|
if (updatedRows.length > 0) {
|
|
831
|
-
if (updatedRows.some((r) => r.status == TaskStatus.Completed)) {
|
|
831
|
+
if (updatedRows.some((r) => r.status == TaskStatus.Completed || r.status == TaskStatus.WaitingChildren)) {
|
|
832
832
|
await this.#circuitBreaker.recordSuccess();
|
|
833
833
|
}
|
|
834
834
|
await this.resolveDependenciesMany(updatedRows.map((r) => ({ id: r.id, status: r.status })), { transaction: tx });
|
|
@@ -1171,6 +1171,7 @@ let PostgresTaskQueue = class PostgresTaskQueue extends TaskQueue {
|
|
|
1171
1171
|
.where(inArray(taskTable.id, tx.pgTransaction.select().from(selection)))
|
|
1172
1172
|
.returning({ id: taskTable.id, status: taskTable.status });
|
|
1173
1173
|
if (updatedRows.length > 0) {
|
|
1174
|
+
await this.#circuitBreaker.recordFailures(updatedRows.length);
|
|
1174
1175
|
await this.resolveDependenciesMany(updatedRows.map((r) => ({ id: r.id, status: r.status, namespace: this.#namespace })), { transaction: tx });
|
|
1175
1176
|
}
|
|
1176
1177
|
return updatedRows;
|
package/task-queue/task.error.js
CHANGED