@@ -57,27 +57,33 @@ Module modSync
5757 Function Load() As String
5858 If My.Settings.Sync_Enable = True Then
5959 My.Application.Log.WriteEntry( "Loading sync module" )
60- If My.Settings.Sync_ServerURL = "" Then
61- My.Application.Log.WriteEntry( "No sync server URL set, asking for it" )
62- My.Settings.Sync_ServerURL = InputBox( "Enter sync server URL." , "Sync Server URL" )
63- End If
64- If My.Settings.Sync_SandstormToken = "" AndAlso (My.Settings.Sync_ServerURL.StartsWith( "http://api-" ) Or My.Settings.Sync_ServerURL.StartsWith( "https://api-" )) Then
65- My.Application.Log.WriteEntry( "Sandstorm Sync URL identified, asking for token" )
66- My.Settings.Sync_SandstormToken = InputBox( "Sandstorm requires an additional token for access." , "Sandstorm Access Token" )
67- End If
68- If My.Settings.Sync_AccessKey = "" Then
69- My.Application.Log.WriteEntry( "No sync server access key set, asking for it" )
70- My.Settings.Sync_AccessKey = InputBox( "Enter sync server access key." , "Sync Server Access Key" )
71- End If
72- If My.Settings.Sync_CryptoKey = "" Then
73- My.Application.Log.WriteEntry( "No sync server crypto key set, asking for it" )
74- My.Settings.Sync_CryptoKey = InputBox( "Enter cryptographic key for synced nodes" , "Sync Crypto Key" )
60+ If My.Settings.Sync_LocalQueueMode = False Then
61+ If My.Settings.Sync_ServerURL = "" Then
62+ My.Application.Log.WriteEntry( "No sync server URL set, asking for it" )
63+ My.Settings.Sync_ServerURL = InputBox( "Enter sync server URL." , "Sync Server URL" )
64+ End If
65+ If My.Settings.Sync_SandstormToken = "" AndAlso (My.Settings.Sync_ServerURL.StartsWith( "http://api-" ) Or My.Settings.Sync_ServerURL.StartsWith( "https://api-" )) Then
66+ My.Application.Log.WriteEntry( "Sandstorm Sync URL identified, asking for token" )
67+ My.Settings.Sync_SandstormToken = InputBox( "Sandstorm requires an additional token for access." , "Sandstorm Access Token" )
68+ End If
69+ If My.Settings.Sync_AccessKey = "" Then
70+ My.Application.Log.WriteEntry( "No sync server access key set, asking for it" )
71+ My.Settings.Sync_AccessKey = InputBox( "Enter sync server access key." , "Sync Server Access Key" )
72+ End If
73+ If My.Settings.Sync_CryptoKey = "" Then
74+ My.Application.Log.WriteEntry( "No sync server crypto key set, asking for it" )
75+ My.Settings.Sync_CryptoKey = InputBox( "Enter cryptographic key for synced nodes" , "Sync Crypto Key" )
76+ End If
7577 End If
7678
7779 tmrSyncHeartbeatTimer = New System.Timers.Timer
7880 My.Application.Log.WriteEntry( "Scheduling automatic heartbeats to sync server" )
7981 AddHandler tmrSyncHeartbeatTimer.Elapsed, AddressOf SendHeartbeatHandler
80- tmrSyncHeartbeatTimer.Interval = 300000 ' 5min
82+ If My.Settings.Sync_LocalQueueMode = False Then
83+ tmrSyncHeartbeatTimer.Interval = 300000 ' 5min
84+ Else
85+ tmrSyncHeartbeatTimer.Interval = 30000 ' 30sec
86+ End If
8187 tmrSyncHeartbeatTimer.Enabled = True
8288
8389 Dim InitialSyncHeartbeat As New Threading.Thread( AddressOf InitialHeartbeatHandler)
0 commit comments