fix jobconfigparser, fix error in database->mssql, reduce logging for jobrunner

This commit is contained in:
Jonathan Jenne
2019-04-24 11:47:34 +02:00
parent 0bf0f8a05d
commit b387ff5376
6 changed files with 108 additions and 101 deletions

View File

@@ -8,7 +8,11 @@ Public Class JobConfigParser
Private Const ARGS_KEYVALUE_DELIMITER As String = "::"
Private Const ARGS_LIST_DELIMITER As String = "|"
''' <summary>
''' Parse a job config string. ex: True|* 0/3 * * * ?|Arg1=Foo
''' </summary>
''' <param name="ConfigString"></param>
''' <returns>A populated JobConfig object</returns>
Public Shared Function ParseConfig(ConfigString As String) As JobConfig
If JobOptionsRegex.IsMatch(ConfigString) Then
Dim oMatches = JobOptionsRegex.Matches(ConfigString)
@@ -19,11 +23,11 @@ Public Class JobConfigParser
If oSplitOptions.Length = 3 Then
oOptions.Enabled = CBool(oSplitOptions(0))
oOptions.CronExpression = oSplitOptions(1)
oOptions.Arguments = New Dictionary(Of String, String)
oOptions.Arguments = ParseOptionalArguments(oSplitOptions(2))
ElseIf oSplitOptions.Length = 2 Then
oOptions.Enabled = CBool(oSplitOptions(0))
oOptions.CronExpression = oSplitOptions(1)
oOptions.Arguments = ParseOptionalArguments(oSplitOptions(2))
oOptions.Arguments = New Dictionary(Of String, String)
Else
Throw New ArgumentException("Config Malformed")
End If