From a7c282ca348c1e8e60559e5c064caee28ba11eec Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:34:12 +0300 Subject: refactor: so much shit --- rankings/input/records.json | 8 ++++---- rankings/main.go | 25 +++++++++++-------------- 2 files changed, 15 insertions(+), 18 deletions(-) (limited to 'rankings') diff --git a/rankings/input/records.json b/rankings/input/records.json index 276310f..884fd49 100644 --- a/rankings/input/records.json +++ b/rankings/input/records.json @@ -335,7 +335,7 @@ "id": 47830, "name": "Rat Maze", "mode": 2, - "wr": 2 + "wr": 0 }, { "id": 45466, @@ -401,7 +401,7 @@ "id": 47847, "name": "Cooperative Bridges", "mode": 2, - "wr": 3 + "wr": 2 }, { "id": 47850, @@ -431,7 +431,7 @@ "id": 47860, "name": "Turret Walls", "mode": 2, - "wr": 4 + "wr": 2 }, { "id": 52641, @@ -509,7 +509,7 @@ "id": 52712, "name": "Double Bounce", "mode": 2, - "wr": 2 + "wr": 0 }, { "id": 52713, diff --git a/rankings/main.go b/rankings/main.go index dfafb0c..70a25e9 100644 --- a/rankings/main.go +++ b/rankings/main.go @@ -2,12 +2,8 @@ package main import ( "log" - "os" - "os/signal" - "syscall" "github.com/joho/godotenv" - "github.com/robfig/cron/v3" ) func main() { @@ -15,16 +11,17 @@ func main() { if err != nil { log.Fatalln("Error loading .env file:", err.Error()) } - c := cron.New() - _, err = c.AddFunc("0 0 * * *", run) - if err != nil { - log.Fatalln("Error scheduling daily reminder:", err.Error()) - } - c.Start() - log.Println("ready for jobs") - sc := make(chan os.Signal, 1) - signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt) - <-sc + run() + // c := cron.New() + // _, err = c.AddFunc("0 0 * * *", run) + // if err != nil { + // log.Fatalln("Error scheduling daily reminder:", err.Error()) + // } + // c.Start() + // log.Println("ready for jobs") + // sc := make(chan os.Signal, 1) + // signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt) + // <-sc } func run() { -- cgit v1.2.3