mirror of
https://github.com/aljazceru/haven.git
synced 2025-12-19 06:34:22 +01:00
revert timeout remove sleep
This commit is contained in:
@@ -26,10 +26,10 @@ func importOwnerNotes() {
|
|||||||
fmt.Println("Error parsing start date:", err)
|
fmt.Println("Error parsing start date:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
endTime := startTime.Add(500 * time.Hour)
|
endTime := startTime.Add(240 * time.Hour)
|
||||||
|
|
||||||
for {
|
for {
|
||||||
ctx, cancel := context.WithTimeout(ctx, 3*time.Second)
|
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
startTimestamp := nostr.Timestamp(startTime.Unix())
|
startTimestamp := nostr.Timestamp(startTime.Unix())
|
||||||
@@ -47,8 +47,8 @@ func importOwnerNotes() {
|
|||||||
}
|
}
|
||||||
log.Println("📦 imported", ownerImportedNotes, "owner notes")
|
log.Println("📦 imported", ownerImportedNotes, "owner notes")
|
||||||
|
|
||||||
startTime = startTime.Add(500 * time.Hour)
|
startTime = startTime.Add(240 * time.Hour)
|
||||||
endTime = endTime.Add(500 * time.Hour)
|
endTime = endTime.Add(240 * time.Hour)
|
||||||
|
|
||||||
if startTime.After(time.Now()) {
|
if startTime.After(time.Now()) {
|
||||||
log.Println("✅ owner note import complete! ")
|
log.Println("✅ owner note import complete! ")
|
||||||
|
|||||||
Reference in New Issue
Block a user