File tree 7 files changed +5
-252
lines changed
routes/configuration/cache
7 files changed +5
-252
lines changed Original file line number Diff line number Diff line change @@ -133,5 +133,5 @@ export const initServer = async () => {
133
133
134
134
writeOpenApiToFile ( server ) ;
135
135
await updateTxListener ( ) ;
136
- await clearCacheCron ( "server" ) ;
136
+ await clearCacheCron ( ) ;
137
137
} ;
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export async function updateCacheConfiguration(fastify: FastifyInstance) {
47
47
await updateConfiguration ( { ...req . body } ) ;
48
48
const config = await getConfig ( false ) ;
49
49
// restarting cache cron with updated cron schedule
50
- await clearCacheCron ( "server" ) ;
50
+ await clearCacheCron ( ) ;
51
51
res . status ( StatusCodes . OK ) . send ( {
52
52
result : {
53
53
clearCacheCronSchedule : config . clearCacheCronSchedule ,
Original file line number Diff line number Diff line change 1
- import type { env } from "../env" ;
2
1
import { accessTokenCache } from "./access-token" ;
3
2
import { invalidateConfig } from "./get-config" ;
4
3
import { sdkCache } from "./get-sdk" ;
5
4
import { walletsCache } from "./get-wallet" ;
6
5
import { webhookCache } from "./get-webhook" ;
7
6
import { keypairCache } from "./keypair" ;
8
7
9
- export const clearCache = async (
10
- _service : ( typeof env ) [ "LOG_SERVICES" ] [ 0 ] ,
11
- ) : Promise < void > => {
8
+ export const clearCache = async ( ) : Promise < void > => {
12
9
invalidateConfig ( ) ;
13
10
webhookCache . clear ( ) ;
14
11
sdkCache . clear ( ) ;
Original file line number Diff line number Diff line change 1
1
import { CronJob } from "cron" ;
2
2
import { clearCache } from "../cache/clear-cache" ;
3
3
import { getConfig } from "../cache/get-config" ;
4
- import type { env } from "../env" ;
5
4
6
5
let task : CronJob ;
7
6
8
- export const clearCacheCron = async (
9
- service : ( typeof env ) [ "LOG_SERVICES" ] [ 0 ] ,
10
- ) => {
7
+ export const clearCacheCron = async ( ) => {
11
8
const config = await getConfig ( ) ;
12
9
13
10
if ( ! config . clearCacheCronSchedule ) {
@@ -20,7 +17,7 @@ export const clearCacheCron = async (
20
17
}
21
18
22
19
task = new CronJob ( config . clearCacheCronSchedule , async ( ) => {
23
- await clearCache ( service ) ;
20
+ await clearCache ( ) ;
24
21
} ) ;
25
22
task . start ( ) ;
26
23
} ;
Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ import {
3
3
newConfigurationListener ,
4
4
updatedConfigurationListener ,
5
5
} from "./listeners/config-listener" ;
6
- import {
7
- newWebhooksListener ,
8
- updatedWebhooksListener ,
9
- } from "./listeners/webhook-listener" ;
10
6
import { initCancelRecycledNoncesWorker } from "./tasks/cancel-recycled-nonces-worker" ;
11
7
import { initMineTransactionWorker } from "./tasks/mine-transaction-worker" ;
12
8
import { initNonceHealthCheckWorker } from "./tasks/nonce-health-check-worker" ;
@@ -31,14 +27,6 @@ export const initWorker = async () => {
31
27
await initNonceResyncWorker ( ) ;
32
28
await initWalletSubscriptionWorker ( ) ;
33
29
34
- // Listen for new & updated configuration data.
35
- await newConfigurationListener ( ) ;
36
- await updatedConfigurationListener ( ) ;
37
-
38
- // Listen for new & updated webhooks data.
39
- await newWebhooksListener ( ) ;
40
- await updatedWebhooksListener ( ) ;
41
-
42
30
// Contract subscriptions.
43
31
await chainIndexerListener ( ) ;
44
32
} ;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments