File tree Expand file tree Collapse file tree 8 files changed +5
-346
lines changed
routes/configuration/cache Expand file tree Collapse file tree 8 files changed +5
-346
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import { env } from "../shared/utils/env";
88import { logger } from "../shared/utils/logger" ;
99import { metricsServer } from "../shared/utils/prometheus" ;
1010import { withServerUsageReporting } from "../shared/utils/usage" ;
11- import { updateTxListener } from "./listeners/update-tx-listener" ;
1211import { withAdminRoutes } from "./middleware/admin-routes" ;
1312import { withAuth } from "./middleware/auth" ;
1413import { withCors } from "./middleware/cors" ;
@@ -132,6 +131,5 @@ export const initServer = async () => {
132131 } ) ;
133132
134133 writeOpenApiToFile ( server ) ;
135- await updateTxListener ( ) ;
136- await clearCacheCron ( "server" ) ;
134+ await clearCacheCron ( ) ;
137135} ;
Load Diff This file was deleted.
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 11import { chainIndexerListener } from "./listeners/chain-indexer-listener" ;
2- import {
3- newConfigurationListener ,
4- updatedConfigurationListener ,
5- } from "./listeners/config-listener" ;
6- import {
7- newWebhooksListener ,
8- updatedWebhooksListener ,
9- } from "./listeners/webhook-listener" ;
102import { initCancelRecycledNoncesWorker } from "./tasks/cancel-recycled-nonces-worker" ;
113import { initMineTransactionWorker } from "./tasks/mine-transaction-worker" ;
124import { initNonceHealthCheckWorker } from "./tasks/nonce-health-check-worker" ;
@@ -31,14 +23,6 @@ export const initWorker = async () => {
3123 await initNonceResyncWorker ( ) ;
3224 await initWalletSubscriptionWorker ( ) ;
3325
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-
4226 // Contract subscriptions.
4327 await chainIndexerListener ( ) ;
4428} ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments