@@ -149,6 +149,7 @@ class HawkAPI {
149149 /**
150150 * Creates factories to work with models
151151 * @param dataLoaders - dataLoaders for fetching data form database
152+ * @returns factories object
152153 */
153154 private static setupFactories ( dataLoaders : DataLoaders ) : ContextFactories {
154155 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -213,21 +214,18 @@ class HawkAPI {
213214
214215 /**
215216 * Initializing accounting SDK
216- */
217- let tlsVerify ;
218-
219- /**
220217 * Checking env variables
221218 * If at least one path is not transmitted, the variable tlsVerify is undefined
222219 */
223220 if (
224221 ! [ process . env . TLS_CA_CERT , process . env . TLS_CERT , process . env . TLS_KEY ] . some ( value => value === undefined || value . length === 0 )
225222 ) {
226- tlsVerify = {
227- tlsCaCertPath : `${ process . env . TLS_CA_CERT } ` ,
228- tlsCertPath : `${ process . env . TLS_CERT } ` ,
229- tlsKeyPath : `${ process . env . TLS_KEY } ` ,
230- } ;
223+ // tlsVerify is used for accounting SDK (currently commented out)
224+ // const tlsVerify = {
225+ // tlsCaCertPath: `${process.env.TLS_CA_CERT}`,
226+ // tlsCertPath: `${process.env.TLS_CERT}`,
227+ // tlsKeyPath: `${process.env.TLS_KEY}`,
228+ // };
231229 }
232230
233231 /*
@@ -253,11 +251,12 @@ class HawkAPI {
253251 public async start ( ) : Promise < void > {
254252 await mongo . setupConnections ( ) ;
255253 await rabbitmq . setupConnections ( ) ;
256-
254+
257255 // Initialize Redis singleton with auto-reconnect
258256 const redis = RedisHelper . getInstance ( ) ;
257+
259258 await redis . initialize ( ) ;
260-
259+
261260 await this . server . start ( ) ;
262261 this . app . use ( graphqlUploadExpress ( ) ) ;
263262 this . server . applyMiddleware ( { app : this . app } ) ;
0 commit comments