fixed behaviour in case failed retrieval (#15)
This commit is contained in:
parent
a312e0f37e
commit
b051fedcfd
|
@ -93,7 +93,7 @@
|
|||
conf
|
||||
(filter
|
||||
(match-lambda
|
||||
((conf-entry news-item)
|
||||
((conf-entry news-items)
|
||||
(eq? (config-entry-type conf-entry) feed-type))
|
||||
(_ #f))
|
||||
pair-entries)
|
||||
|
|
|
@ -74,17 +74,15 @@
|
|||
(retrieved-data (and<= retrieval-fn config-entry))
|
||||
(parsed-entries (and<=> parse-fn retrieved-data))
|
||||
(new-items (if (equal? retrieved-data #f)
|
||||
'()
|
||||
'()
|
||||
(database-insert-entries!
|
||||
db conf config-entry parsed-entries))))
|
||||
(if (or (eq? retrieval-fn #f) (eq? parse-fn #f))
|
||||
(begin
|
||||
(format #t "unable to find the configured feed type!\n")
|
||||
#f)
|
||||
(if (eq? retrieved-data #f)
|
||||
(begin
|
||||
(begin
|
||||
(if (eq? retrieved-data #f)
|
||||
(format #t "failed to retrieve data!\n")
|
||||
#f)
|
||||
(begin
|
||||
(format #t "new items: ~a\n" (length new-items))
|
||||
`(,config-entry ,new-items))))))
|
||||
(format #t "new items: ~a\n" (length new-items)))
|
||||
`(,config-entry ,new-items)))))
|
||||
|
|
Loading…
Reference in New Issue