aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-10-18 00:09:09 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-10-18 00:09:09 +0300
commitfb186450121751bd8463e6485665e66b83901c8d (patch)
tree0796debefec52963c92b721b3bddc16c6c857d09
parentrefactor: upload run logic improvement (diff)
downloadlphub-fb186450121751bd8463e6485665e66b83901c8d.tar.gz
lphub-fb186450121751bd8463e6485665e66b83901c8d.tar.bz2
lphub-fb186450121751bd8463e6485665e66b83901c8d.zip
refactor: enable rankings cron, update website desc
-rw-r--r--frontend/public/index.html2
-rw-r--r--rankings/main.go25
2 files changed, 15 insertions, 12 deletions
diff --git a/frontend/public/index.html b/frontend/public/index.html
index 0bd6da2..46a123a 100644
--- a/frontend/public/index.html
+++ b/frontend/public/index.html
@@ -7,7 +7,7 @@
7 <meta name="theme-color" content="#000000" /> 7 <meta name="theme-color" content="#000000" />
8 <meta 8 <meta
9 name="description" 9 name="description"
10 content="Web site created using create-react-app" 10 content="Least Portals Hub"
11 /> 11 />
12 <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> 12 <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13 <!-- 13 <!--
diff --git a/rankings/main.go b/rankings/main.go
index 70a25e9..dfafb0c 100644
--- a/rankings/main.go
+++ b/rankings/main.go
@@ -2,8 +2,12 @@ package main
2 2
3import ( 3import (
4 "log" 4 "log"
5 "os"
6 "os/signal"
7 "syscall"
5 8
6 "github.com/joho/godotenv" 9 "github.com/joho/godotenv"
10 "github.com/robfig/cron/v3"
7) 11)
8 12
9func main() { 13func main() {
@@ -11,17 +15,16 @@ func main() {
11 if err != nil { 15 if err != nil {
12 log.Fatalln("Error loading .env file:", err.Error()) 16 log.Fatalln("Error loading .env file:", err.Error())
13 } 17 }
14 run() 18 c := cron.New()
15 // c := cron.New() 19 _, err = c.AddFunc("0 0 * * *", run)
16 // _, err = c.AddFunc("0 0 * * *", run) 20 if err != nil {
17 // if err != nil { 21 log.Fatalln("Error scheduling daily reminder:", err.Error())
18 // log.Fatalln("Error scheduling daily reminder:", err.Error()) 22 }
19 // } 23 c.Start()
20 // c.Start() 24 log.Println("ready for jobs")
21 // log.Println("ready for jobs") 25 sc := make(chan os.Signal, 1)
22 // sc := make(chan os.Signal, 1) 26 signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)
23 // signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt) 27 <-sc
24 // <-sc
25} 28}
26 29
27func run() { 30func run() {