Skip to content

Commit cba79fb

Browse files
authored
feat: support redis stream as event source (#2192)
* chore: initial server logic separation * fix: dummy import * fix: imports * fix: export ibd * chore: client * feat: use new client * chore: add pre-release
1 parent a5d2a8b commit cba79fb

17 files changed

+1456
-1018
lines changed

.env

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ PG_APPLICATION_NAME=stacks-blockchain-api
6060
# (with both Event Server and API endpoints).
6161
# STACKS_API_MODE=
6262

63+
# If this API instance should consume events from a Stacks node (`stacks` or `default`) or a Store-and-forward Redis service (`redis`).
64+
# STACKS_API_EVENT_SOURCE=
65+
# REDIS_URL=
66+
6367
# To avoid running unnecessary mempool stats during transaction influx, we use a debounce mechanism for the process.
6468
# This variable controls the duration it waits until there are no further mempool updates
6569
# MEMPOOL_STATS_DEBOUNCE_INTERVAL=1000

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- master
77
- develop
88
- beta
9-
- nakamoto
9+
- redis-stream
1010
tags-ignore:
1111
- "**"
1212
paths-ignore:

.releaserc

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"prerelease": true
88
},
99
{
10-
"name": "nakamoto",
11-
"channel": "nakamoto",
10+
"name": "redis-stream",
11+
"channel": "redis-stream",
1212
"prerelease": true
1313
}
1414
],

.vscode/launch.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"env": {
2626
"NODE_ENV": "development",
2727
"TS_NODE_SKIP_IGNORE": "true"
28-
}
28+
},
29+
"killBehavior": "polite",
2930
},
3031
{
3132
"type": "node",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* eslint-disable camelcase */
2+
3+
exports.shorthands = undefined;
4+
5+
exports.up = pgm => {
6+
pgm.addColumn('event_observer_requests', {
7+
sequence_id: {
8+
type: 'string'
9+
}
10+
});
11+
};
12+
13+
exports.down = pgm => {
14+
pgm.dropColumn('event_observer_requests', 'sequence_id');
15+
};

0 commit comments

Comments
 (0)