forked from gaulliath/operative-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
load.go
38 lines (32 loc) · 1.19 KB
/
load.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package cron
import (
"time"
"github.com/Oni-kuki/operative-framework/cron/email_to_domain.cron"
"github.com/Oni-kuki/operative-framework/cron/pastebin.cron"
"github.com/Oni-kuki/operative-framework/cron/societe_com.cron"
"github.com/Oni-kuki/operative-framework/cron/tweets.cron"
"github.com/Oni-kuki/operative-framework/session"
"github.com/Oni-kuki/operative-framework/supervisor"
)
func Load(sup *supervisor.Supervisor) {
// Loading tweets.service
sup.Services = append(sup.Services, session.Listener{
CronJob: tweets_cron.GetNewService(sup.GetStandaloneSession()),
NextExecution: time.Now(),
})
// Loading pastebin.service
sup.Services = append(sup.Services, session.Listener{
CronJob: pastebin_cron.GetNewService(sup.GetStandaloneSession()),
NextExecution: time.Now(),
})
// Loading email_to_domain.service
sup.Services = append(sup.Services, session.Listener{
CronJob: email_to_domain_cron.GetNewService(sup.GetStandaloneSession()),
NextExecution: time.Now(),
})
// Loading societe_com.service
sup.Services = append(sup.Services, session.Listener{
CronJob: societe_com_cron.GetNewService(sup.GetStandaloneSession()),
NextExecution: time.Now(),
})
}