Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sven Greiner
finf-ScalaAnnounceBot
Commits
ed53f1c0
Commit
ed53f1c0
authored
Aug 08, 2012
by
Sven Greiner
Browse files
Better DEBUG outpot for new posts
parent
2e639499
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/de/sammyshp/announcebot/PeriodicRssFetcher.scala
View file @
ed53f1c0
...
...
@@ -23,8 +23,14 @@ class PeriodicRssFetcher(url: String, pollInterval: Long, callback: String => Un
.
toList
.
sortBy
(
x
=>
x
.
_3
)
Log
.
d
(
posts
.
size
match
{
case
0
=>
"No new posts"
case
1
=>
"1 new post"
case
i
=>
""
+
i
+
" new posts"
})
if
(
lastMessageTime
>
0
)
{
Log
.
d
(
""
+
posts
.
size
+
" new posts"
)
posts
.
foreach
(
x
=>
callback
(
(
if
(
x
.
_4
==
1
)
"Neuer Beitrag"
...
...
@@ -35,7 +41,7 @@ class PeriodicRssFetcher(url: String, pollInterval: Long, callback: String => Un
+
"\": "
+
x
.
_2
))
}
else
{
Log
.
d
(
"
"
+
posts
.
size
+
" new posts, but this was the first fetch
"
)
Log
.
d
(
"
First fetch, no announce
"
)
}
if
(
posts
.
size
>
0
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment