checking for crawling boolean
This commit is contained in:
parent
d57dd47c56
commit
003de16e2b
@ -149,16 +149,20 @@ func PollMastodonPleroma(endpoint string, reportPostChan chan ReportPost) {
|
|||||||
if newpost.Id > min_id {
|
if newpost.Id > min_id {
|
||||||
min_id = newpost.Id
|
min_id = newpost.Id
|
||||||
}
|
}
|
||||||
newinstance := newpost.Account.Acct[at_sign+1:]
|
|
||||||
ri_mutex.Lock()
|
|
||||||
_, exists := runninginstances[newinstance]
|
|
||||||
if exists == false {
|
|
||||||
m := RunningInstance{}
|
|
||||||
runninginstances[newinstance] = m
|
|
||||||
go StartInstance(newinstance, reportPostChan)
|
|
||||||
}
|
|
||||||
|
|
||||||
ri_mutex.Unlock()
|
// Only done if we are crawling
|
||||||
|
if settings.Crawl == true {
|
||||||
|
newinstance := newpost.Account.Acct[at_sign+1:]
|
||||||
|
ri_mutex.Lock()
|
||||||
|
_, exists := runninginstances[newinstance]
|
||||||
|
if exists == false {
|
||||||
|
m := RunningInstance{}
|
||||||
|
runninginstances[newinstance] = m
|
||||||
|
go StartInstance(newinstance, reportPostChan)
|
||||||
|
}
|
||||||
|
|
||||||
|
ri_mutex.Unlock()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
time.Sleep(time.Second * 10)
|
time.Sleep(time.Second * 10)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user