fix jobconfigparser, fix error in database->mssql, reduce logging for jobrunner
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user