Fixed RSS timer
This commit is contained in:
parent
7b32722607
commit
3306a9f1ab
6
main.go
6
main.go
@ -312,12 +312,14 @@ func NewDaemon(server string, polling int, download string, socket net.Listener,
|
|||||||
|
|
||||||
func (d *Daemon) Serve() {
|
func (d *Daemon) Serve() {
|
||||||
d.CheckRSS()
|
d.CheckRSS()
|
||||||
|
rssTick := time.Tick(d.PollingRate * time.Minute)
|
||||||
|
checkTick := time.Tick(10 * time.Second)
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-time.After(d.PollingRate * time.Minute):
|
case <-rssTick:
|
||||||
e.Log("Checking RSS", LogStd())
|
e.Log("Checking RSS", LogStd())
|
||||||
d.CheckRSS()
|
d.CheckRSS()
|
||||||
case <-time.After(10 * time.Second):
|
case <-checkTick:
|
||||||
d.CheckTorrents()
|
d.CheckTorrents()
|
||||||
case conn := <-d.Listener:
|
case conn := <-d.Listener:
|
||||||
d.ReadSocket(conn)
|
d.ReadSocket(conn)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user