File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 11import cron from "node-cron" ;
2- import { ACCEPTED_ERROR_CODES } from "@hypercerts-org/marketplace-sdk" ;
2+ import { OrderValidatorCode } from "@hypercerts-org/marketplace-sdk" ;
33import { SupabaseDataService } from "../services/SupabaseDataService.js" ;
44import _ from "lodash" ;
55import { kyselyData } from "../client/kysely.js" ;
66import { sql } from "kysely" ;
77
8+ /**
9+ * These error codes are considered temporary and should be
10+ * rechecked periodically so that they can be marked as valid again.
11+ */
12+ export const TEMPORARILY_INVALID_ERROR_CODES = [
13+ OrderValidatorCode . ORDER_EXPECTED_TO_BE_VALID ,
14+ OrderValidatorCode . TOO_EARLY_TO_EXECUTE_ORDER ,
15+ ] ;
16+
817export default class OrderInvalidationCronjob {
918 private static instance : OrderInvalidationCronjob ;
1019 private dataService : SupabaseDataService ;
@@ -45,7 +54,7 @@ export default class OrderInvalidationCronjob {
4554 "validator_codes" ,
4655 "<@" ,
4756 // @ts -expect-error Typing issue with sql arrays
48- sql `ARRAY[${ sql . join ( ACCEPTED_ERROR_CODES ) } ]::int4[]` ,
57+ sql `ARRAY[${ sql . join ( TEMPORARILY_INVALID_ERROR_CODES ) } ]::int4[]` ,
4958 ) ,
5059 ] ) ,
5160 )
You can’t perform that action at this time.
0 commit comments