minor regex checking
This commit is contained in:
parent
ec1743905a
commit
e9bd9b67cf
5
poll.go
5
poll.go
@ -113,7 +113,6 @@ func PollMastodonPleroma(endpoint string, o *RunningInstance) {
|
||||
ri_mutex.Lock()
|
||||
runninginstances[endpoint] = m
|
||||
ri_mutex.Unlock()
|
||||
log.Print("Failure here", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
@ -175,10 +174,9 @@ func PollMastodonPleroma(endpoint string, o *RunningInstance) {
|
||||
for _, newpost := range newposts {
|
||||
go check_post(newpost.Uri)
|
||||
matchset := re.FindStringSubmatch(newpost.Uri)
|
||||
if matchset != nil {
|
||||
newinstance := matchset[1]
|
||||
|
||||
log.Print(newinstance + " reported by " + endpoint)
|
||||
|
||||
// Check min_id
|
||||
if newpost.Id > min_id {
|
||||
min_id = newpost.Id
|
||||
@ -187,6 +185,7 @@ func PollMastodonPleroma(endpoint string, o *RunningInstance) {
|
||||
// Only done if we are crawling
|
||||
go CheckInstance(newinstance, endpoint)
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Second * 10)
|
||||
}
|
||||
}
|
||||
|
@ -92,10 +92,11 @@ func StreamMastodon(endpoint string, o *RunningInstance) {
|
||||
go check_post(newpost.Uri)
|
||||
|
||||
matchset := re.FindStringSubmatch(newpost.Uri)
|
||||
if matchset != nil {
|
||||
newinstance := matchset[1]
|
||||
|
||||
go CheckInstance(newinstance, endpoint)
|
||||
}
|
||||
}
|
||||
if retry == true {
|
||||
time.Sleep(time.Minute * 30)
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user