Get GDPicture Key from Database
This commit is contained in:
@@ -330,13 +330,26 @@ Public Class ImportZUGFeRDFiles
|
||||
Public Sub Start(Arguments As Object) Implements IJob.Start
|
||||
Dim oArgs As WorkerArgs = Arguments
|
||||
Dim oPropertyExtractor = New PropertyValues(_logConfig)
|
||||
Dim oAttachmentExtractor = New PDFAttachments(_logConfig, oArgs.GDPictureKey)
|
||||
Dim oAttachmentExtractor = New PDFAttachments(_logConfig)
|
||||
|
||||
_logger.Debug("Starting Job {0}", [GetType].Name)
|
||||
|
||||
_logger.Debug("Registering GDPicture License")
|
||||
Dim oLicenseManager As New LicenseManager
|
||||
oLicenseManager.RegisterKEY(oArgs.GDPictureKey)
|
||||
If _mssql IsNot Nothing Then
|
||||
Try
|
||||
Dim oSQL = "SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'"
|
||||
Dim oLicenseKey As String = _mssql.GetScalarValue(oSQL)
|
||||
Dim oLicenseManager As New LicenseManager
|
||||
oLicenseManager.RegisterKEY(oLicenseKey)
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
_logger.Warn("GDPicture License could not be retrieved! Query failed! Exiting job.")
|
||||
Exit Sub
|
||||
End Try
|
||||
Else
|
||||
_logger.Warn("GDPicture License could not be retrieved! MSSQL is not enabled! Exiting job.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
For Each oPath As String In oArgs.WatchDirectories
|
||||
|
||||
@@ -13,7 +13,7 @@ Public Class PDFAttachments
|
||||
Public FileContents As Byte()
|
||||
End Class
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, GdPictureKey As String)
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
Logger = LogConfig.GetLogger
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ Public Class WorkerArgs
|
||||
Public AttachmentsSubDirectory As String
|
||||
Public PropertyMap As Dictionary(Of String, XmlItemProperty)
|
||||
Public InsertIntoSQLServer As Boolean
|
||||
Public GDPictureKey As String
|
||||
|
||||
Public Sub New()
|
||||
WatchDirectories = New List(Of String)
|
||||
@@ -20,6 +19,5 @@ Public Class WorkerArgs
|
||||
AttachmentsSubDirectory = Nothing
|
||||
PropertyMap = New Dictionary(Of String, XmlItemProperty)
|
||||
InsertIntoSQLServer = False
|
||||
GDPictureKey = String.Empty
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user