File tree Expand file tree Collapse file tree 7 files changed +5
-252
lines changed
routes/configuration/cache Expand file tree Collapse file tree 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 () => {
133133
134134 writeOpenApiToFile ( server ) ;
135135 await updateTxListener ( ) ;
136- await clearCacheCron ( "server" ) ;
136+ await clearCacheCron ( ) ;
137137} ;
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export async function updateCacheConfiguration(fastify: FastifyInstance) {
4747 await updateConfiguration ( { ...req . body } ) ;
4848 const config = await getConfig ( false ) ;
4949 // restarting cache cron with updated cron schedule
50- await clearCacheCron ( "server" ) ;
50+ await clearCacheCron ( ) ;
5151 res . status ( StatusCodes . OK ) . send ( {
5252 result : {
5353 clearCacheCronSchedule : config . clearCacheCronSchedule ,
Original file line number Diff line number Diff line change 1- import type { env } from "../env" ;
21import { accessTokenCache } from "./access-token" ;
32import { invalidateConfig } from "./get-config" ;
43import { sdkCache } from "./get-sdk" ;
54import { walletsCache } from "./get-wallet" ;
65import { webhookCache } from "./get-webhook" ;
76import { keypairCache } from "./keypair" ;
87
9- export const clearCache = async (
10- _service : ( typeof env ) [ "LOG_SERVICES" ] [ 0 ] ,
11- ) : Promise < void > => {
8+ export const clearCache = async ( ) : Promise < void > => {
129 invalidateConfig ( ) ;
1310 webhookCache . clear ( ) ;
1411 sdkCache . clear ( ) ;
Original file line number Diff line number Diff line change 11import { CronJob } from "cron" ;
22import { clearCache } from "../cache/clear-cache" ;
33import { getConfig } from "../cache/get-config" ;
4- import type { env } from "../env" ;
54
65let task : CronJob ;
76
8- export const clearCacheCron = async (
9- service : ( typeof env ) [ "LOG_SERVICES" ] [ 0 ] ,
10- ) => {
7+ export const clearCacheCron = async ( ) => {
118 const config = await getConfig ( ) ;
129
1310 if ( ! config . clearCacheCronSchedule ) {
@@ -20,7 +17,7 @@ export const clearCacheCron = async (
2017 }
2118
2219 task = new CronJob ( config . clearCacheCronSchedule , async ( ) => {
23- await clearCache ( service ) ;
20+ await clearCache ( ) ;
2421 } ) ;
2522 task . start ( ) ;
2623} ;
Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ import {
33 newConfigurationListener ,
44 updatedConfigurationListener ,
55} from "./listeners/config-listener" ;
6- import {
7- newWebhooksListener ,
8- updatedWebhooksListener ,
9- } from "./listeners/webhook-listener" ;
106import { initCancelRecycledNoncesWorker } from "./tasks/cancel-recycled-nonces-worker" ;
117import { initMineTransactionWorker } from "./tasks/mine-transaction-worker" ;
128import { initNonceHealthCheckWorker } from "./tasks/nonce-health-check-worker" ;
@@ -31,14 +27,6 @@ export const initWorker = async () => {
3127 await initNonceResyncWorker ( ) ;
3228 await initWalletSubscriptionWorker ( ) ;
3329
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-
4230 // Contract subscriptions.
4331 await chainIndexerListener ( ) ;
4432} ;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments