@ercworldio/blockchain-shared 1.0.3-dev.3-PROJ-1296.26 → 1.0.3-dev.3-PROJ-1296.28

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.
@@ -4,18 +4,11 @@ import { Pool } from "pg";
4
4
  import { OperationType } from "../../../contracts/types/escrow";
5
5
  import { MarkCompleteScheduleJob, ScheduleTransactionJobWithDetails } from "../../types/db";
6
6
  declare class ScheduleTransactionService {
7
- static get_available_jobs: (pool: Pool, limit?: number, job_ttl_s?: number, lock_metadata?: ClaimJobLockMetadata) => Promise<ScheduleTransactionJob[]>;
7
+ static get_and_lock_available_jobs: (pool: Pool, limit?: number, job_ttl_s?: number, lock_metadata?: ClaimJobLockMetadata) => Promise<ScheduleTransactionJob[]>;
8
8
  /** Same as get_available_jobs but joins withdrawal details from accounting for each job. */
9
- static get_available_jobs_with_details: (pool: Pool, limit?: number, job_ttl_s?: number, lock_metadata?: ClaimJobLockMetadata) => Promise<ScheduleTransactionJobWithDetails[]>;
9
+ static get_and_lock_available_jobs_with_details: (pool: Pool, limit?: number, job_ttl_s?: number, lock_metadata?: ClaimJobLockMetadata) => Promise<ScheduleTransactionJobWithDetails[]>;
10
10
  /**
11
- * Requeues all jobs in the given status to "queued"
12
- * @param pool
13
- * @param current_status
14
- * @param limit
15
- * @param lock_owner
16
- * @param lock_reason
17
- * @param max_retries
18
- * @returns
11
+ * Requeues all jobs in the given status to "queued"
19
12
  */
20
13
  static requeue_expired_jobs: (pool: Pool, current_status: ScheduleJobStatus, limit: number, lock_owner: string, lock_reason: string, max_retries: number) => Promise<ScheduleTransactionJob[]>;
21
14
  static batch_update_status: (pool: Pool, operation_type: OperationType, request_ids: number[], new_status: ScheduleJobStatus) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"ScheduleTransactionService.d.ts","sourceRoot":"","sources":["../../../../src/services/db/timelock/ScheduleTransactionService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,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object.defineProperty(exports, "__esModule", { value: true });
13
- const uuid_1 = require("uuid");
14
13
  class ScheduleTransactionService {
15
14
  }
16
15
  _a = ScheduleTransactionService;
17
- ScheduleTransactionService.get_available_jobs = (pool_1, ...args_1) => __awaiter(void 0, [pool_1, ...args_1], void 0, function* (pool, limit = 10, job_ttl_s = 120, lock_metadata = { lock_owner: "schedule-tx-worker", lock_reason: "process_queued" }) {
16
+ ScheduleTransactionService.get_and_lock_available_jobs = (pool_1, ...args_1) => __awaiter(void 0, [pool_1, ...args_1], void 0, function* (pool, limit = 10, job_ttl_s = 120, lock_metadata = { lock_owner: "schedule-tx-worker", lock_reason: "process_queued" }) {
18
17
  const ttlSeconds = job_ttl_s;
19
- const batchGroupId = (0, uuid_1.v4)();
20
18
  const res = yield pool.query(`
21
- WITH candidates AS (
22
- SELECT id
23
- FROM multisig.schedule_transaction_jobs
24
- WHERE status = 'queued'
25
- AND (lock_expires_at IS NULL OR lock_expires_at < now())
26
- ORDER BY blockchain, chain_id ASC
19
+ WITH status_ids AS (
20
+ SELECT
21
+ MAX(CASE WHEN status = 'queued' THEN id END) AS queued_id,
22
+ MAX(CASE WHEN status = 'processing' THEN id END) AS processing_id
23
+ FROM multisig.schedule_job_statuses
24
+ ),
25
+ candidates AS (
26
+ SELECT cj.id
27
+ FROM multisig.schedule_transaction_jobs cj, status_ids
28
+ WHERE cj.status_id = status_ids.queued_id
29
+ AND (cj.lock_expires_at IS NULL OR cj.lock_expires_at < now())
30
+ ORDER BY cj.blockchain, cj.chain_id ASC
27
31
  LIMIT $1
28
32
  FOR UPDATE SKIP LOCKED
29
33
  )
30
34
  UPDATE multisig.schedule_transaction_jobs cj
31
35
  SET
32
- status = 'processing',
33
- locked_at = now(),
36
+ status_id = si.processing_id,
37
+ locked_at = now(),
34
38
  lock_expires_at = now() + ($2 || ' seconds')::interval,
35
- batch_group_id = $3,
36
39
  metadata = jsonb_set(
37
40
  jsonb_set(
38
41
  coalesce(cj.metadata, '{}'::jsonb),
39
42
  '{lock_owner}',
40
- to_jsonb($4::text)
43
+ to_jsonb($3::text)
41
44
  ),
42
45
  '{lock_reason}',
43
- to_jsonb($5::text)
46
+ to_jsonb($4::text)
44
47
  ),
45
48
  updated_at = now()
46
- FROM candidates c
49
+ FROM candidates c, status_ids si
47
50
  WHERE cj.id = c.id
48
51
  RETURNING cj.*;
49
- `, [limit, ttlSeconds, batchGroupId, lock_metadata.lock_owner, lock_metadata.lock_reason]);
52
+ `, [limit, ttlSeconds, lock_metadata.lock_owner, lock_metadata.lock_reason]);
50
53
  return res.rows;
51
54
  });
52
55
  /** Same as get_available_jobs but joins withdrawal details from accounting for each job. */
53
- ScheduleTransactionService.get_available_jobs_with_details = (pool_1, ...args_1) => __awaiter(void 0, [pool_1, ...args_1], void 0, function* (pool, limit = 10, job_ttl_s = 120, lock_metadata = { lock_owner: "schedule-tx-worker", lock_reason: "process_queued" }) {
56
+ ScheduleTransactionService.get_and_lock_available_jobs_with_details = (pool_1, ...args_1) => __awaiter(void 0, [pool_1, ...args_1], void 0, function* (pool, limit = 10, job_ttl_s = 120, lock_metadata = { lock_owner: "schedule-tx-worker", lock_reason: "process_queued" }) {
54
57
  const ttlSeconds = job_ttl_s;
55
- const batchGroupId = (0, uuid_1.v4)();
56
58
  const res = yield pool.query(`
57
- WITH candidates AS (
58
- SELECT id
59
- FROM multisig.schedule_transaction_jobs
60
- WHERE status = 'queued'
61
- AND (lock_expires_at IS NULL OR lock_expires_at < now())
62
- ORDER BY blockchain, chain_id ASC
59
+ WITH status_ids AS (
60
+ SELECT
61
+ MAX(CASE WHEN status = 'queued' THEN id END) AS queued_id,
62
+ MAX(CASE WHEN status = 'processing' THEN id END) AS processing_id
63
+ FROM multisig.schedule_job_statuses
64
+ ),
65
+ candidates AS (
66
+ SELECT cj.id
67
+ FROM multisig.schedule_transaction_jobs cj, status_ids
68
+ WHERE cj.status_id = status_ids.queued_id
69
+ AND (cj.lock_expires_at IS NULL OR cj.lock_expires_at < now())
70
+ ORDER BY cj.blockchain, cj.chain_id ASC
63
71
  LIMIT $1
64
72
  FOR UPDATE SKIP LOCKED
65
73
  ),
66
74
  updated AS (
67
75
  UPDATE multisig.schedule_transaction_jobs cj
68
76
  SET
69
- status = 'processing',
70
- locked_at = now(),
77
+ status_id = si.processing_id,
78
+ locked_at = now(),
71
79
  lock_expires_at = now() + ($2 || ' seconds')::interval,
72
- batch_group_id = $3,
73
80
  metadata = jsonb_set(
74
81
  jsonb_set(
75
82
  coalesce(cj.metadata, '{}'::jsonb),
76
83
  '{lock_owner}',
77
- to_jsonb($4::text)
84
+ to_jsonb($3::text)
78
85
  ),
79
86
  '{lock_reason}',
80
- to_jsonb($5::text)
87
+ to_jsonb($4::text)
81
88
  ),
82
89
  updated_at = now()
83
- FROM candidates c
90
+ FROM candidates c, status_ids si
84
91
  WHERE cj.id = c.id
85
92
  RETURNING cj.*
86
93
  )
87
- SELECT u.*, accounting.fn_get_crypto_withdrawal_details(u.request_id) AS withdrawal_details
88
- FROM updated u;
89
- `, [limit, ttlSeconds, batchGroupId, lock_metadata.lock_owner, lock_metadata.lock_reason]);
94
+ SELECT u.*, sjs.status, accounting.fn_get_crypto_withdrawal_details(u.request_id) AS withdrawal_details
95
+ FROM updated u
96
+ JOIN multisig.schedule_job_statuses sjs ON sjs.id = u.status_id
97
+ `, [limit, ttlSeconds, lock_metadata.lock_owner, lock_metadata.lock_reason]);
90
98
  return res.rows;
91
99
  });
92
100
  /**
93
- * Requeues all jobs in the given status to "queued"
94
- * @param pool
95
- * @param current_status
96
- * @param limit
97
- * @param lock_owner
98
- * @param lock_reason
99
- * @param max_retries
100
- * @returns
101
+ * Requeues all jobs in the given status to "queued"
101
102
  */
102
103
  ScheduleTransactionService.requeue_expired_jobs = (pool, current_status, limit, lock_owner, lock_reason, max_retries) => __awaiter(void 0, void 0, void 0, function* () {
103
104
  const res = yield pool.query(`
104
- WITH expired AS (
105
- SELECT id
106
- FROM multisig.schedule_transaction_jobs
107
- WHERE status = $4
105
+ WITH status_ids AS (
106
+ SELECT
107
+ MAX(CASE WHEN status = $4::text THEN id END) AS current_status_id,
108
+ MAX(CASE WHEN status = 'queued' THEN id END) AS queued_id
109
+ FROM multisig.schedule_job_statuses
110
+ ),
111
+ expired AS (
112
+ SELECT sj.id
113
+ FROM multisig.schedule_transaction_jobs sj, status_ids
114
+ WHERE sj.status_id = status_ids.current_status_id
108
115
  AND (
109
- lock_expires_at IS NULL
110
- OR lock_expires_at < now()
116
+ sj.lock_expires_at IS NULL
117
+ OR sj.lock_expires_at < now()
111
118
  )
112
- AND retry_count < $5
113
- ORDER BY lock_expires_at ASC
119
+ AND sj.retry_count < $5
120
+ ORDER BY sj.lock_expires_at ASC
114
121
  LIMIT $1
115
122
  FOR UPDATE SKIP LOCKED
116
123
  )
117
124
  UPDATE multisig.schedule_transaction_jobs cj
118
125
  SET
119
- status = 'queued',
120
- locked_at = NULL,
126
+ status_id = si.queued_id,
127
+ locked_at = NULL,
121
128
  lock_expires_at = NULL,
122
129
  metadata = jsonb_set(
123
130
  jsonb_set(
@@ -131,43 +138,45 @@ ScheduleTransactionService.requeue_expired_jobs = (pool, current_status, limit,
131
138
  true
132
139
  ),
133
140
  updated_at = now()
134
- FROM expired e
141
+ FROM expired e, status_ids si
135
142
  WHERE cj.id = e.id
136
143
  RETURNING cj.*;
137
144
  `, [limit, lock_owner, lock_reason, current_status, max_retries]);
138
145
  return res.rows;
139
146
  });
140
147
  ScheduleTransactionService.batch_update_status = (pool, operation_type, request_ids, new_status) => __awaiter(void 0, void 0, void 0, function* () {
141
- const status = new_status;
142
148
  yield pool.query(`
143
149
  UPDATE multisig.schedule_transaction_jobs
144
- SET status = $1, updated_at = CURRENT_TIMESTAMP
145
- WHERE operation_type = $2::int AND request_id = ANY($2)
146
- `, [status, operation_type, request_ids]);
147
- return;
150
+ SET
151
+ status_id = (SELECT id FROM multisig.schedule_job_statuses WHERE status = $1),
152
+ updated_at = CURRENT_TIMESTAMP
153
+ WHERE operation_type = $2::int
154
+ AND request_id = ANY($3)
155
+ `, [new_status, operation_type, request_ids]);
148
156
  });
149
157
  ScheduleTransactionService.batch_update_failed_jobs = (pool, operation_type, request_ids, new_status, error_message, retryable) => __awaiter(void 0, void 0, void 0, function* () {
150
158
  yield pool.query(`
151
159
  UPDATE multisig.schedule_transaction_jobs
152
- SET
153
- status = $1,
154
- updated_at = CURRENT_TIMESTAMP,
160
+ SET
161
+ status_id = (SELECT id FROM multisig.schedule_job_statuses WHERE status = $1),
162
+ updated_at = CURRENT_TIMESTAMP,
155
163
  error_message = COALESCE($2, error_message),
156
- last_error_at = CASE
164
+ last_error_at = CASE
157
165
  WHEN $2 IS NOT NULL THEN CURRENT_TIMESTAMP
158
166
  ELSE last_error_at
159
167
  END,
160
- retry_count = CASE
161
- WHEN $3 = true THEN retry_count + 1
162
- ELSE retry_count
163
- END
164
- WHERE operation_type = $5 AND request_id = ANY($4)
168
+ retry_count = CASE
169
+ WHEN $3 = true THEN retry_count + 1
170
+ ELSE retry_count
171
+ END
172
+ WHERE operation_type = $5
173
+ AND request_id = ANY($4)
165
174
  `, [
166
175
  new_status,
167
176
  error_message || null,
168
177
  retryable === true,
169
178
  request_ids,
170
- operation_type
179
+ operation_type,
171
180
  ]);
172
181
  });
173
182
  ScheduleTransactionService.batch_update_failed_jobs_custom_error = (pool, operation_type, jobs) => __awaiter(void 0, void 0, void 0, function* () {
@@ -179,7 +188,7 @@ ScheduleTransactionService.batch_update_failed_jobs_custom_error = (pool, operat
179
188
  yield pool.query(`
180
189
  UPDATE multisig.schedule_transaction_jobs AS t
181
190
  SET
182
- status = c.status,
191
+ status_id = sjs.id,
183
192
  error_message = c.error_message,
184
193
  last_error_at = CURRENT_TIMESTAMP,
185
194
  retry_count = CASE WHEN c.retryable THEN t.retry_count + 1 ELSE t.retry_count END,
@@ -192,8 +201,9 @@ ScheduleTransactionService.batch_update_failed_jobs_custom_error = (pool, operat
192
201
  UNNEST($4::text[]) AS error_message,
193
202
  UNNEST($5::boolean[]) AS retryable
194
203
  ) AS c
204
+ JOIN multisig.schedule_job_statuses sjs ON sjs.status = c.status
195
205
  WHERE t.operation_type = c.operation_type
196
- AND t.request_id = c.request_id
206
+ AND t.request_id = c.request_id
197
207
  `, [operationTypes, requestIds, newStatuses, errorMessages, retryables]);
198
208
  });
199
209
  ScheduleTransactionService.batch_update_executed_jobs = (pool, data) => __awaiter(void 0, void 0, void 0, function* () {
@@ -203,21 +213,21 @@ ScheduleTransactionService.batch_update_executed_jobs = (pool, data) => __awaite
203
213
  const sentAts = data.map(d => d.sent_at);
204
214
  yield pool.query(`
205
215
  UPDATE multisig.schedule_transaction_jobs AS t
206
- SET
207
- tx_hash = c.tx_hash,
208
- sent_at = c.sent_at,
209
- status = 'confirming',
216
+ SET
217
+ tx_hash = c.tx_hash,
218
+ sent_at = c.sent_at,
219
+ status_id = (SELECT id FROM multisig.schedule_job_statuses WHERE status = 'confirming'),
210
220
  updated_at = CURRENT_TIMESTAMP
211
221
  FROM (
212
- SELECT
213
- UNNEST($1::int[]) AS operation_type,
214
- UNNEST($2::int[]) AS request_id,
215
- UNNEST($3::text[]) AS tx_hash,
222
+ SELECT
223
+ UNNEST($1::int[]) AS operation_type,
224
+ UNNEST($2::int[]) AS request_id,
225
+ UNNEST($3::text[]) AS tx_hash,
216
226
  UNNEST($4::timestamptz[]) AS sent_at
217
227
  ) AS c
218
228
  WHERE t.request_id = c.request_id
219
- AND t.operation_type = c.operation_type
220
- `, [operationTypes, requestIds, txHashes, sentAts]);
229
+ AND t.operation_type = c.operation_type
230
+ `, [operationTypes, requestIds, txHashes, sentAts]);
221
231
  });
222
232
  ScheduleTransactionService.mark_complete = (pool, payloads) => __awaiter(void 0, void 0, void 0, function* () {
223
233
  if (payloads.length === 0)
@@ -227,15 +237,15 @@ ScheduleTransactionService.mark_complete = (pool, payloads) => __awaiter(void 0,
227
237
  yield pool.query(`
228
238
  UPDATE multisig.schedule_transaction_jobs AS t
229
239
  SET
230
- status = 'completed',
240
+ status_id = (SELECT id FROM multisig.schedule_job_statuses WHERE status = 'completed'),
231
241
  updated_at = CURRENT_TIMESTAMP
232
242
  FROM (
233
243
  SELECT
234
244
  UNNEST($1::int[]) AS request_id,
235
- UNNEST($2::int[]) AS operation_type,
245
+ UNNEST($2::int[]) AS operation_type
236
246
  ) AS c
237
247
  WHERE t.request_id = c.request_id
238
- AND t.operation_type = c.operation_type
239
- `, [requestIds, operationTypes]);
248
+ AND t.operation_type = c.operation_type
249
+ `, [requestIds, operationTypes]);
240
250
  });
241
251
  exports.default = ScheduleTransactionService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ercworldio/blockchain-shared",
3
- "version": "1.0.3-dev.3-PROJ-1296.26",
3
+ "version": "1.0.3-dev.3-PROJ-1296.28",
4
4
  "description": "Shared library for blockchain projects",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",