MS Jobrunner only start when job exists
This commit is contained in:
parent
b81ac40139
commit
8a208993d9
@ -94,8 +94,8 @@
|
||||
<Reference Include="DigitalData.Modules.ZooFlow">
|
||||
<HintPath>..\..\DDModules\ZooFlow\bin\Debug\DigitalData.Modules.ZooFlow.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14, Version=14.2.89.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.2.89\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||
<Reference Include="GdPicture.NET.14, Version=14.2.90.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.2.90\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
@ -636,11 +636,11 @@
|
||||
<None Include="Resources\check1.svg" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\GdPicture.runtimes.windows.14.2.89\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.2.89\build\net462\GdPicture.runtimes.windows.targets')" />
|
||||
<Import Project="..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.2.89\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.2.89\build\net462\GdPicture.runtimes.windows.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@ -33,7 +33,7 @@ Public Class frmDocumentResultList
|
||||
Public Property ShouldReturnToPreviousForm As Boolean = False Implements IResultForm.ShouldReturnToPreviousForm
|
||||
|
||||
' Helper Classes
|
||||
Private Client As Client
|
||||
Private EDMI_API_Client As Client
|
||||
Private Documentloader As Loader
|
||||
Private ControlManager As AttributeControls
|
||||
Private CheckoutManager As CheckInOut
|
||||
@ -168,7 +168,7 @@ Public Class frmDocumentResultList
|
||||
|
||||
LanguageEx.LogApplicationLanguage(Logger)
|
||||
|
||||
Documentloader = New Loader(LogConfig, OperationMode, Client, Environment.User)
|
||||
Documentloader = New Loader(LogConfig, OperationMode, EDMI_API_Client, Environment.User)
|
||||
|
||||
If OperationMode = OperationMode.NoAppServer Then
|
||||
Watcher = New Watcher(LogConfig, pEnableWatching:=False)
|
||||
@ -219,7 +219,7 @@ Public Class frmDocumentResultList
|
||||
RibbonPageGroup_Navigation.Visible = Params.ShowBackNavigation
|
||||
|
||||
If OperationMode = OperationMode.ZooFlow Or OperationMode = OperationMode.WithAppServer Then
|
||||
CtrlObjectPropertyDialog.Initialize(LogConfig, Me, Client, Environment)
|
||||
CtrlObjectPropertyDialog.Initialize(LogConfig, Me, EDMI_API_Client, Environment)
|
||||
CtrlObjectPropertyDialog.Hide()
|
||||
SwitchMainContainerHorizontal.Visibility = BarItemVisibility.Never
|
||||
SwitchDetailContainerHorizontal.Visibility = BarItemVisibility.Never
|
||||
@ -419,7 +419,7 @@ Public Class frmDocumentResultList
|
||||
#Region "Watcher"
|
||||
|
||||
Public Async Sub Watcher_FileOpened(sender As Object, e As DocumentResultList.Watcher.FileOpenedArgs) Handles Watcher.FileOpened
|
||||
Await Client.SetObjectStateAsync(e.File.Document.Id, OBJECT_STATE_FILE_OPENED, New Options.SetObjectStateOptions With {
|
||||
Await EDMI_API_Client.SetObjectStateAsync(e.File.Document.Id, OBJECT_STATE_FILE_OPENED, New Options.SetObjectStateOptions With {
|
||||
.Language = Environment.User.Language,
|
||||
.Username = Environment.User.UserName
|
||||
})
|
||||
@ -430,7 +430,7 @@ Public Class frmDocumentResultList
|
||||
Dim oDoctype As GlobalStateDoctype = Nothing
|
||||
|
||||
If e.File.Document.DocumentType IsNot Nothing Then
|
||||
oDoctype = Client.ClientConfig.DocumentTypes.
|
||||
oDoctype = EDMI_API_Client.ClientConfig.DocumentTypes.
|
||||
Where(Function(doctype) doctype.Name = e.File.Document.DocumentType).
|
||||
FirstOrDefault()
|
||||
End If
|
||||
@ -477,7 +477,7 @@ Public Class frmDocumentResultList
|
||||
Private Async Function Watcher_UpdateFile(pFile As DocumentResultList.Watcher.OpenFile, pCreateNewVersion As Boolean) As Task
|
||||
Dim oFileInfo As New FileInfo(pFile.FilePath)
|
||||
Dim oDisplayName As String = pFile.Document.DisplayFileName
|
||||
Dim oObjectId = Await Client.UpdateFileAsync(pFile.Document.Id, pFile.FilePath, New Options.UpdateFileOptions With {
|
||||
Dim oObjectId = Await EDMI_API_Client.UpdateFileAsync(pFile.Document.Id, pFile.FilePath, New Options.UpdateFileOptions With {
|
||||
.CreateNewFileVersion = pCreateNewVersion,
|
||||
.Language = Environment.User.Language,
|
||||
.Username = Environment.User.UserName
|
||||
@ -521,11 +521,11 @@ Public Class frmDocumentResultList
|
||||
Dim oAddress As String = oServerAddress.Item1
|
||||
Dim oPort As Integer = oServerAddress.Item2
|
||||
|
||||
Client = New Client(LogConfig, oAddress, oPort)
|
||||
ControlManager = New AttributeControls(LogConfig, Environment, Client)
|
||||
CheckoutManager = New CheckInOut(LogConfig, Client)
|
||||
EDMI_API_Client = New Client(LogConfig, oAddress, oPort)
|
||||
ControlManager = New AttributeControls(LogConfig, Environment, EDMI_API_Client)
|
||||
CheckoutManager = New CheckInOut(LogConfig, EDMI_API_Client)
|
||||
|
||||
If Not Client.Connect() Then
|
||||
If Not EDMI_API_Client.Connect() Then
|
||||
Logger.Warn("Client could not connect to Service at [{0}]", Environment.Service.Address)
|
||||
Return False
|
||||
End If
|
||||
@ -920,7 +920,7 @@ Public Class frmDocumentResultList
|
||||
FileEx.OpenFileProperties(_CurrentDocument.FullPath)
|
||||
|
||||
Case Else
|
||||
Dim oPropertyDialog As New frmObjectPropertyDialog(LogConfig, Environment, Client, _CurrentDocument.Id)
|
||||
Dim oPropertyDialog As New frmObjectPropertyDialog(LogConfig, Environment, EDMI_API_Client, _CurrentDocument.Id)
|
||||
oPropertyDialog.Show()
|
||||
End Select
|
||||
End Sub
|
||||
@ -970,13 +970,13 @@ Public Class frmDocumentResultList
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Await Client.CheckOutFile(oObjectId, oResultComment)
|
||||
Await EDMI_API_Client.CheckOutFile(oObjectId, oResultComment)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MenuItemCheckInFile_ItemClick(sender As Object, e As ItemClickEventArgs) Handles MenuItemCheckInFile.ItemClick
|
||||
Dim oObjectId = _CurrentDocument?.Id
|
||||
Client.CheckInFile(oObjectId)
|
||||
EDMI_API_Client.CheckInFile(oObjectId)
|
||||
End Sub
|
||||
|
||||
Private Function ShowCheckInOutCommentForm()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="GdPicture" version="14.2.89" targetFramework="net462" />
|
||||
<package id="GdPicture.runtimes.windows" version="14.2.89" targetFramework="net462" />
|
||||
<package id="GdPicture" version="14.2.90" targetFramework="net462" />
|
||||
<package id="GdPicture.runtimes.windows" version="14.2.90" targetFramework="net462" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net461" />
|
||||
</packages>
|
||||
@ -88,8 +88,7 @@
|
||||
<Reference Include="DigitalData.Modules.Filesystem">
|
||||
<HintPath>..\..\DDModules\Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Interfaces, Version=1.12.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Reference Include="DigitalData.Modules.Interfaces">
|
||||
<HintPath>..\..\DDModules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Jobs, Version=2.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
@ -108,8 +107,8 @@
|
||||
<Reference Include="DigitalData.Modules.Windream">
|
||||
<HintPath>..\..\DDModules\Windream\bin\Debug\DigitalData.Modules.Windream.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14, Version=14.2.90.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.2.90\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||
<Reference Include="GdPicture.NET.14">
|
||||
<HintPath>..\GUIs.Test.ZUGFeRDTest\bin\Debug\GdPicture.NET.14.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mail">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll</HintPath>
|
||||
|
||||
@ -23,7 +23,7 @@ Public Class Form1
|
||||
_logger = _logConfig.GetLogger()
|
||||
_mssql = New MSSQLServer(_logConfig, My.Settings.MSSQL_CONNECTIONSTRING)
|
||||
|
||||
_zugferd = New ZUGFeRDInterface(_logConfig, "21182889975216572111813147150675976632", New ZUGFeRDInterface.ZugferdOptions)
|
||||
_zugferd = New ZUGFeRDInterface(_logConfig, "ZuiJA6OdjNXB7Fj_kVP7eoRF9zkM8frhIUa_-Pow6nUY2K1MrYaL0jF9_ppuVSVHuSIXQ201E7gGtpDxV21nByMTgW8VH9qp2w3Ziz2nib048QjknObNOZlx5t7CrhR1BmTVJfvDPQiLcGnRfqQnO03OfVPnIIjHWPs471dZWg79tB-VysgIvH-RmkWVKUPfkn9u5GfKfJ0ybGnQ7v4bKOWFwEnzxmWWouVv3XmUEZRh2lmubbHN9Qb752c486ndLHzjPRPFH2QcevziOcQ3_bEWCnIdqh8y6gpbRFTnXPZqCxlMuLPK-aJLm6ViF2M7EHWDSuThI2FId4zyuTf6-3K0hTw3ntPDCsd0dZW5CKSy0dpH6cDw9tUv_AxMp3UOkx_yo_GQCB273I9zLJae5Z0m5fUrqh3kfQ8pHCU5uDkLVo26NbQdOdX95LKX_RMsmtRYF8FSlj500TMcOMc3dPpqrh6-FA2LMpu86JHzZ2p_80MQ0kxa5chuCDA2z1Lx3CGMa9CAIEJgpCoI-wzSfmAcyeCnWoacV7k_klGci3l-dWbNIr_CPU6yrENhQaBfkqQoIYl5wECbL-WvsuBfRDvHDF0yyw_VoxUJ3hpH_q3mSlMrFuVKQtJcMnz8H81KoYwJn2zbNlCbyg6FH1VMl39UVhB2rB5W4S7llmbqEk4XJbx7Z7Ag5p-bktuwri7Exweq0DWOw85e-kv8T0d8prj2BRMOsDD7_Hjgz7iTgkU5_cS-5qGSWCjDpPRen5rL", New ZUGFeRDInterface.ZugferdOptions)
|
||||
End Sub
|
||||
|
||||
Private Function LoadPropertyMapFor(Args As WorkerArgs)
|
||||
@ -48,8 +48,7 @@ Public Class Form1
|
||||
.IsRequired = isRequired,
|
||||
.IsGrouped = isGrouped,
|
||||
.GroupScope = groupScope,
|
||||
.Specification = specification,
|
||||
.XMLPath = xmlPath.Replace(".Value", "")
|
||||
.Specification = specification',.XMLPath = xmlPath.Replace(".Value", "")
|
||||
})
|
||||
Next
|
||||
|
||||
@ -130,7 +129,7 @@ Public Class Form1
|
||||
oResult = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
||||
|
||||
WriteLog("Specification: " & oResult.Specification)
|
||||
WriteLog("XML-Schema: " & oResult.UsedXMLSchema)
|
||||
'WriteLog("XML-Schema: " & oResult.UsedXMLSchema)
|
||||
WriteLog("Embedded File Name: " & oResult.DataFileName)
|
||||
|
||||
Dim oSpecification = oResult.Specification
|
||||
@ -152,7 +151,7 @@ Public Class Form1
|
||||
|
||||
WriteLog("Missing Properties: [{0}]", oResult2.MissingProperties.Count)
|
||||
For Each Prop In oResult2.MissingProperties
|
||||
WriteLog("Missing Property: [{0}]", Prop.Description)
|
||||
WriteLog("Missing Property: [{0}]", Prop.ToString) ''Prop.Description
|
||||
Next
|
||||
|
||||
WriteLog("--------------------------------")
|
||||
|
||||
@ -66,7 +66,7 @@ Public Class JobRunner
|
||||
{"MSSQL", _mssql},
|
||||
{"Args", oJobConfig.Args}
|
||||
}
|
||||
|
||||
Dim oCountGraphJobs As Int16 = 0
|
||||
Dim oJob = JobBuilder.Create(Of T)().
|
||||
WithIdentity(oJobIdentity).
|
||||
UsingJobData(oJobData).
|
||||
@ -82,12 +82,13 @@ Public Class JobRunner
|
||||
Await _scheduler.ScheduleJob(oJob, oTrigger)
|
||||
|
||||
_Logger.Info("Job {0} scheduled.", JobName)
|
||||
oCountGraphJobs += 1
|
||||
Else
|
||||
_Logger.Info("Job {0} is disabled.", JobName)
|
||||
End If
|
||||
|
||||
' If StartWithoutDelay is True, start Job after 10 Seconds
|
||||
If oJobConfig.StartWithoutDelay Then
|
||||
If oJobConfig.StartWithoutDelay And oCountGraphJobs > 0 Then
|
||||
Dim oDebugJob = JobBuilder.Create(Of T)().
|
||||
WithIdentity(oJobIdentity & "-DEBUG").
|
||||
UsingJobData(oJobData).
|
||||
@ -100,6 +101,10 @@ Public Class JobRunner
|
||||
|
||||
_Logger.Info("Job {0} will start in 10 Seconds.", JobName)
|
||||
Await _scheduler.ScheduleJob(oDebugJob, oDebugTrigger)
|
||||
Else
|
||||
If oCountGraphJobs = 0 Then
|
||||
_Logger.Info("No Jobs configured!!")
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.0.0")>
|
||||
<Assembly: AssemblyVersion("2.4.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user