Skip to content

Commit

Permalink
removed the previously deactivated dishNameDownload-Cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Mar 11, 2024
1 parent aa1427e commit a0e877b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ spec:
env:
- name: ENVIRONMENT
value: prod
- name: MensaCronDisabled
value: "false"
- name: APNS_P8_FILE_PATH
value: /etc/apns_auth_key.p8
- name: OMDB_API_KEY
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ services:
- APNS_KEY_ID=${APNS_KEY_ID}
- APNS_TEAM_ID=${APNS_TEAM_ID}
- APNS_P8_FILE_PATH=${APNS_P8_FILE_PATH}
- MensaCronDisabled=true
- OMDB_API_KEY=${OMDB_API_KEY}
- CAMPUS_API_TOKEN=${CAMPUS_API_TOKEN}
- SMTP_PASSWORD=${SMTP_PASSWORD}
Expand Down
7 changes: 1 addition & 6 deletions server/backend/cron/cronjobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package cron
import (
"time"

"github.com/TUM-Dev/Campus-Backend/server/env"

"github.com/TUM-Dev/Campus-Backend/server/model"
"github.com/mmcdole/gofeed"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -42,7 +40,6 @@ func New(db *gorm.DB) *CronService {
}

func (c *CronService) Run() error {
log.WithField("MensaCronActive", env.IsMensaCronActive()).Debug("running cron service")
for {
g := new(errgroup.Group)
log.Trace("Cron: checking for pending")
Expand Down Expand Up @@ -78,9 +75,7 @@ func (c *CronService) Run() error {
case FileDownloadType:
g.Go(func() error { return c.fileDownloadCron() })
case DishNameDownload:
if env.IsMensaCronActive() {
g.Go(c.dishNameDownloadCron)
}
g.Go(func() error { return c.dishNameDownloadCron() })
case MovieType:
g.Go(func() error { return c.movieCron() })
/*
Expand Down

0 comments on commit a0e877b

Please sign in to comment.