Skip to content

Commit 87588db

Browse files
committed
chore(APP): change 300s task intervals to 120s
Set governance, org-meta, and picklist sync defaults and fallbacks to 120 seconds.
1 parent e1fdf73 commit 87588db

12 files changed

Lines changed: 28 additions & 28 deletions

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ In the `CHIA_ROOT` directory (usually `~/.chia/mainnet` on Linux), CADT will add
280280
* **ONLY_CADT_SUBSCRIPTIONS**: When `true` (the default), CADT keeps DataLayer subscriptions aligned with the governance **orgList** in both directions. Organizations removed from the orgList are unsubscribed from DataLayer (`subscribed: false`); already-synced registry data on this node is **not** deleted. Organizations on the orgList that are not subscribed are subscribed (including orgs re-added after a prior removal, including orgs previously removed via the API delete flow). The home organization and governance body store are never auto-unsubscribed. Reconciliation runs only when a **non-empty** orgList is present locally (after a successful governance sync); an empty orgList is treated as “not ready” and does not trigger unsubscribes. Set to `false` to disable orglist-driven subscribe/unsubscribe reconciliation. While enabled, a manual unsubscribe of an org still listed on the orgList will be reverted on the next sync cycle.
281281
* **LOG_LEVEL**: Controls verbosity of logging. Common settings are `info` and `debug`. Setting to `silly` will log all queries.
282282
* **TASKS**: Section for configuring sync intervals.
283-
* **GOVERNANCE_SYNC_TASK_INTERVAL**: Syncs picklist, orgList, and glossary from the governance node. Default 300 seconds (5 minutes).
284-
* **ORGANIZATION_META_SYNC_TASK_INTERVAL**: Subscribes to default organizations and refreshes metadata for already-imported organizations. Default 300 seconds (5 minutes).
285-
* **PICKLIST_SYNC_TASK_INTERVAL**: Syncs picklist from the governance node. Default 300 seconds (5 minutes).
283+
* **GOVERNANCE_SYNC_TASK_INTERVAL**: Syncs picklist, orgList, and glossary from the governance node. Default 120 seconds (2 minutes).
284+
* **ORGANIZATION_META_SYNC_TASK_INTERVAL**: Subscribes to default organizations and refreshes metadata for already-imported organizations. Default 120 seconds (2 minutes).
285+
* **PICKLIST_SYNC_TASK_INTERVAL**: Syncs picklist from the governance node. Default 120 seconds (2 minutes).
286286
* **MIRROR_CHECK_TASK_INTERVAL**: Checks if our DataLayer is advertising our `DATALAYER_FILE_SERVER_URL` as a mirror for all subscriptions when `AUTO_MIRROR_EXTERNAL_STORES` is true. Default 900 seconds (15 minutes).
287287
* **VALIDATE_ORGANIZATION_TABLE_TASK_INTERVAL**: Validates the organization table periodically. Default 1800 seconds (30 minutes).
288288
* **COIN_MANAGEMENT_TASK_INTERVAL**: Splits wallet coins when usable coin count is low. Default 21600 seconds (6 hours).

docker-compose-example.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ services:
3131
- LOG_LEVEL=info
3232

3333
# APP.TASKS settings
34-
- GOVERNANCE_SYNC_TASK_INTERVAL=300
35-
- ORGANIZATION_META_SYNC_TASK_INTERVAL=300
36-
- PICKLIST_SYNC_TASK_INTERVAL=300
34+
- GOVERNANCE_SYNC_TASK_INTERVAL=120
35+
- ORGANIZATION_META_SYNC_TASK_INTERVAL=120
36+
- PICKLIST_SYNC_TASK_INTERVAL=120
3737
- MIRROR_CHECK_TASK_INTERVAL=900
3838
- VALIDATE_ORGANIZATION_TABLE_TASK_INTERVAL=1800
3939
- COIN_MANAGEMENT_TASK_INTERVAL=21600

src/tasks/sync-default-organizations-v2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ const task = new Task('sync-default-organizations-v2', async () => {
142142
} catch (error) {
143143
loggerV2.error(
144144
`[v2]: failed to validate default organization records and subscriptions. Error ${error.message}. ` +
145-
`Retrying in ${CONFIG?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 300} seconds`,
145+
`Retrying in ${CONFIG?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 120} seconds`,
146146
);
147147
}
148148
});
149149

150150
const job = new SimpleIntervalJob(
151151
{
152-
seconds: CONFIG?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 300,
152+
seconds: CONFIG?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 120,
153153
runImmediately: true,
154154
},
155155
task,

src/tasks/sync-default-organizations.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ const task = new Task('sync-default-organizations', async () => {
131131
} catch (error) {
132132
logger.error(
133133
`failed to validate default organization records and subscriptions. Error ${error.message}. ` +
134-
`Retrying in ${CONFIG?.APP?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 300} seconds`,
134+
`Retrying in ${CONFIG?.APP?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 120} seconds`,
135135
);
136136
}
137137
});
138138

139139
const job = new SimpleIntervalJob(
140140
{
141-
seconds: CONFIG?.APP?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 300,
141+
seconds: CONFIG?.APP?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 120,
142142
runImmediately: true,
143143
},
144144
task,

src/tasks/sync-governance-body-v2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ const task = new Task('sync-governance-meta-v2', async () => {
5454
} catch (error) {
5555
loggerV2.error(
5656
`[v2]: Cannot download Governance data, Retrying in ${
57-
CONFIG?.TASKS?.GOVERNANCE_SYNC_TASK_INTERVAL || 300
57+
CONFIG?.TASKS?.GOVERNANCE_SYNC_TASK_INTERVAL || 120
5858
} seconds. Error: ${error.message}`,
5959
);
6060
}
6161
});
6262

6363
const job = new SimpleIntervalJob(
6464
{
65-
seconds: CONFIG?.TASKS?.GOVERNANCE_SYNC_TASK_INTERVAL || 300,
65+
seconds: CONFIG?.TASKS?.GOVERNANCE_SYNC_TASK_INTERVAL || 120,
6666
runImmediately: true,
6767
},
6868
task,

src/tasks/sync-governance-body.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const task = new Task('sync-governance-meta', async () => {
4444
} catch (error) {
4545
logger.error(
4646
`Cant download Goverance data, Retrying in ${
47-
CONFIG?.APP?.TASKS?.GOVERNANCE_SYNC_TASK_INTERVAL || 300
47+
CONFIG?.APP?.TASKS?.GOVERNANCE_SYNC_TASK_INTERVAL || 120
4848
} seconds`,
4949
error,
5050
);
@@ -53,7 +53,7 @@ const task = new Task('sync-governance-meta', async () => {
5353

5454
const job = new SimpleIntervalJob(
5555
{
56-
seconds: CONFIG?.APP?.TASKS?.GOVERNANCE_SYNC_TASK_INTERVAL || 300,
56+
seconds: CONFIG?.APP?.TASKS?.GOVERNANCE_SYNC_TASK_INTERVAL || 120,
5757
runImmediately: true,
5858
},
5959
task,

src/tasks/sync-organization-meta-v2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const task = new Task('sync-organization-meta-v2', async () => {
2222
} catch (error) {
2323
loggerV2.error(
2424
`Retrying in ${
25-
CONFIG?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 300
25+
CONFIG?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 120
2626
} seconds`,
2727
error,
2828
);
@@ -31,7 +31,7 @@ const task = new Task('sync-organization-meta-v2', async () => {
3131

3232
const job = new SimpleIntervalJob(
3333
{
34-
seconds: CONFIG?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 300,
34+
seconds: CONFIG?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 120,
3535
runImmediately: true,
3636
},
3737
task,

src/tasks/sync-organization-meta.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const task = new Task('sync-organization-meta', async () => {
2222
} catch (error) {
2323
logger.error(
2424
`Retrying in ${
25-
CONFIG?.APP?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 300
25+
CONFIG?.APP?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 120
2626
} seconds`,
2727
error,
2828
);
@@ -32,7 +32,7 @@ const task = new Task('sync-organization-meta', async () => {
3232
const job = new SimpleIntervalJob(
3333
{
3434
// DEFAULT 1
35-
seconds: CONFIG?.APP?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 300,
35+
seconds: CONFIG?.APP?.TASKS?.ORGANIZATION_META_SYNC_TASK_INTERVAL || 120,
3636
runImmediately: true,
3737
},
3838
task,

src/tasks/sync-picklists-v2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ const task = new Task('sync-picklist-v2', async () => {
1818
}
1919
} catch (error) {
2020
loggerV2.error(
21-
`Retrying in ${CONFIG?.TASKS?.PICKLIST_SYNC_TASK_INTERVAL || 300} seconds`,
21+
`Retrying in ${CONFIG?.TASKS?.PICKLIST_SYNC_TASK_INTERVAL || 120} seconds`,
2222
error,
2323
);
2424
}
2525
});
2626

2727
const job = new SimpleIntervalJob(
2828
{
29-
seconds: CONFIG?.TASKS?.PICKLIST_SYNC_TASK_INTERVAL || 300,
29+
seconds: CONFIG?.TASKS?.PICKLIST_SYNC_TASK_INTERVAL || 120,
3030
runImmediately: true,
3131
},
3232
task,

src/tasks/sync-picklists.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ const task = new Task('sync-picklist', async () => {
1616
pullPickListValues();
1717
} catch (error) {
1818
logger.error(
19-
`Retrying in ${CONFIG?.TASKS?.PICKLIST_SYNC_TASK_INTERVAL || 300} seconds`,
19+
`Retrying in ${CONFIG?.TASKS?.PICKLIST_SYNC_TASK_INTERVAL || 120} seconds`,
2020
error,
2121
);
2222
}
2323
});
2424

2525
const job = new SimpleIntervalJob(
2626
{
27-
seconds: CONFIG?.TASKS?.PICKLIST_SYNC_TASK_INTERVAL || 300,
27+
seconds: CONFIG?.TASKS?.PICKLIST_SYNC_TASK_INTERVAL || 120,
2828
runImmediately: true,
2929
},
3030
task,

0 commit comments

Comments
 (0)