Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WP Plugins
Cron-Control
Commits
f32e2e1c
Commit
f32e2e1c
authored
Jul 07, 2017
by
Erick Hitter
Browse files
Organization cleanup to match
4b576c23
parent
4b576c23
Changes
1
Hide whitespace changes
Inline
Side-by-side
runner/runner.go
View file @
f32e2e1c
...
...
@@ -84,25 +84,6 @@ func spawnEventRetrievers(sites <-chan Site, queue chan<- Event) {
logger
.
Println
(
"Event-retrieval workers spawned"
)
}
func
retrieveSitesPeriodically
(
sites
chan
<-
Site
)
{
for
true
{
logger
.
Println
(
"Retrieving sites"
)
siteList
,
err
:=
getSites
()
if
err
!=
nil
{
time
.
Sleep
(
getEventsLoop
)
continue
}
for
_
,
site
:=
range
siteList
{
sites
<-
site
}
logger
.
Printf
(
"Sites sent to event retrievers, next site retreival in %d seconds"
,
getEventsLoop
/
1000
/
1000
/
1000
)
time
.
Sleep
(
getEventsLoop
)
}
}
func
spawnEventWorkers
(
queue
<-
chan
Event
)
{
logger
.
Println
(
"Spawning event workers"
)
...
...
@@ -122,6 +103,25 @@ func spawnEventWorkers(queue <-chan Event) {
os
.
Exit
(
1
)
}
func
retrieveSitesPeriodically
(
sites
chan
<-
Site
)
{
for
true
{
logger
.
Println
(
"Retrieving sites"
)
siteList
,
err
:=
getSites
()
if
err
!=
nil
{
time
.
Sleep
(
getEventsLoop
)
continue
}
for
_
,
site
:=
range
siteList
{
sites
<-
site
}
logger
.
Printf
(
"Sites sent to event retrievers, next site retreival in %d seconds"
,
getEventsLoop
/
1000
/
1000
/
1000
)
time
.
Sleep
(
getEventsLoop
)
}
}
func
keepAlive
()
{
time
.
Sleep
(
getEventsLoop
)
...
...
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