ardeangangkasa6
Member
this is my code:
If falseCount == total_false And elapsedTime <= (check_period_minutes * DateTime.TicksPerMinute) Then
startTime = DateTime.Now
'Delay(wait_delay_seconds*1000)
statusContainersReady(falseCount, server_name)
Delay(wait_delay_seconds*1000) "collision here"
'
Else If elapsedTime >= (check_period_minutes * DateTime.TicksPerMinute) Then
startTime = DateTime.Now
End If
private Sub statusContainersReady(totalfalse As String, server As String)
' Dim psnnotif As String
DateTime.DateFormat = "MM-dd-yyyy HH:mm:ss"
psnnotif = $"
Check on Server: ${server}
ContainersReady false: ${totalfalse}
LAST CHECK - ${DateTime.Date(DateTime.Now)}
"$
SendMessageToTelegram(psnnotif) "collision here"
Log(psnnotif)
End Sub
Sub Delay (DurationMs As Int)
Dim target As Long = DateTime.Now + DurationMs
Do While DateTime.Now < target
Loop
End Sub
the problem if i enable delay (uncomment), my app unable to send the notification to my telegram. otherwise, when i disabled delay (commented) my app can send the notif to my telegram. any idea/wit on how to fix/handle it? thanks a lot
If falseCount == total_false And elapsedTime <= (check_period_minutes * DateTime.TicksPerMinute) Then
startTime = DateTime.Now
'Delay(wait_delay_seconds*1000)
statusContainersReady(falseCount, server_name)
Delay(wait_delay_seconds*1000) "collision here"
'
Else If elapsedTime >= (check_period_minutes * DateTime.TicksPerMinute) Then
startTime = DateTime.Now
End If
private Sub statusContainersReady(totalfalse As String, server As String)
' Dim psnnotif As String
DateTime.DateFormat = "MM-dd-yyyy HH:mm:ss"
psnnotif = $"
Check on Server: ${server}
ContainersReady false: ${totalfalse}
LAST CHECK - ${DateTime.Date(DateTime.Now)}
"$
SendMessageToTelegram(psnnotif) "collision here"
Log(psnnotif)
End Sub
Sub Delay (DurationMs As Int)
Dim target As Long = DateTime.Now + DurationMs
Do While DateTime.Now < target
Loop
End Sub
the problem if i enable delay (uncomment), my app unable to send the notification to my telegram. otherwise, when i disabled delay (commented) my app can send the notif to my telegram. any idea/wit on how to fix/handle it? thanks a lot