* „Linie 27: ConfigManager type does not exist in the project or dependencies. Replaced its usage with manual loading and deserialization of GraphQLConfig from the file path provided.
Linie 29: Replaced oConfigManager.Config with oConfig, which is the manually loaded configuration object. Linie 32: Replaced oConfigManager.Config.BaseUrl with oConfig.BaseUrl to match the new config loading logic.“ in Datei „Jobs\GraphQL\GraphQLJob.vb“
This commit is contained in:
@@ -24,12 +24,20 @@ Public Class GraphQLJob
|
|||||||
Public Sub Start(Args As GraphQLArgs) Implements IJob(Of GraphQLArgs).Start
|
Public Sub Start(Args As GraphQLArgs) Implements IJob(Of GraphQLArgs).Start
|
||||||
Try
|
Try
|
||||||
Dim oConfigPath As String = Args.QueryConfigPath
|
Dim oConfigPath As String = Args.QueryConfigPath
|
||||||
Dim oConfigManager As New ConfigManager(Of GraphQLConfig)(_LogConfig, oConfigPath)
|
' ConfigManager is missing, so we manually load the config
|
||||||
|
Dim oConfig As GraphQLConfig = Nothing
|
||||||
|
If File.Exists(oConfigPath) Then
|
||||||
|
' Simple deserialization from JSON, assuming config is stored as JSON
|
||||||
|
Dim json As String = File.ReadAllText(oConfigPath)
|
||||||
|
oConfig = System.Text.Json.JsonSerializer.Deserialize(Of GraphQLConfig)(json)
|
||||||
|
Else
|
||||||
|
Throw New FileNotFoundException($"Config file not found: {oConfigPath}")
|
||||||
|
End If
|
||||||
|
|
||||||
With oConfigManager.Config
|
With oConfig
|
||||||
_GraphQL = New GraphQLInterface(_LogConfig, .BaseUrl, .Email, .Password, .CertificateFingerprint)
|
_GraphQL = New GraphQLInterface(_LogConfig, .BaseUrl, .Email, .Password, .CertificateFingerprint)
|
||||||
End With
|
End With
|
||||||
_Logger.Info($"baseUrl is: {oConfigManager.Config.BaseUrl}")
|
_Logger.Info($"baseUrl is: {oConfig.BaseUrl}")
|
||||||
_Model = New GraphQLModel(_LogConfig, _MSSQL)
|
_Model = New GraphQLModel(_LogConfig, _MSSQL)
|
||||||
_Writer = New GraphQLWriter(_LogConfig, _MSSQL)
|
_Writer = New GraphQLWriter(_LogConfig, _MSSQL)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user