Skip to content

Commit 2f2fee4

Browse files
committed
client updated
1 parent cdb3ebe commit 2f2fee4

5 files changed

Lines changed: 24 additions & 95 deletions

File tree

package-lock.json

Lines changed: 11 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"devDependencies": {
3838
"@types/mssql": "^8.1.2",
3939
"@types/node": "^20.3.2",
40-
"@types/pg": "^8.10.2",
41-
"@types/pg-cursor": "^2.7.0",
40+
"@types/pg": "^8.15.6",
41+
"@types/pg-cursor": "^2.7.2",
4242
"@typescript-eslint/eslint-plugin": "^6.7.3",
4343
"@typescript-eslint/parser": "^6.7.3",
4444
"pg": "^8.11.1",

src/drivers/postgres/PostgreSqlDriver.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ pg.types.setTypeParser(pg.types.builtins.DATE, (n) =>
4545
pg.types.setTypeParser(pg.types.builtins.TIMETZ, (n) =>
4646
new DateTime(n)
4747
);
48+
49+
pg.defaults.parseInputDatesAsUTC = true;
50+
4851
// pg.types.setTypeParser(pg.types.builtins.NUMERIC, (n) => n ? Number(n) : 0);
4952

5053
class DbReader implements IDbReader {

src/tests/eternity/throttle/throttle-defer.test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,21 @@ export default async function (this: TestConfig) {
7676

7777
await storage.seed();
7878

79+
7980
const id = await c.queue(SendWorkflow, "a", {
8081
throttle: {
81-
group: "a",
82-
deferSeconds: 15
83-
}
82+
group: "a1",
83+
deferSeconds: 60,
84+
},
8485
});
8586

8687
const result = await storage.getWorkflow(id);
8788

8889
const next = await c.queue(SendWorkflow, "b", {
8990
throttle: {
90-
group: "a",
91-
deferSeconds: 15
92-
}
91+
group: "a1",
92+
deferSeconds: 60
93+
},
9394
});
9495

9596
const resultNext = await storage.getWorkflow(next);

src/workflows/WorkflowStorage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export default class WorkflowStorage {
6363
&& x.eta >= Sql.cast.asDateTime(p.now)
6464
)
6565
.orderByDescending(void 0, (p) => (x) => x.queued)
66+
.trace(console.log)
6667
.first();
6768
if (w) {
6869
w.eta = DateTime.from(w.eta).addSeconds(deferSeconds);

0 commit comments

Comments
 (0)