Skip to content

Commit

Permalink
Fix parsing of configuration for cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
keyraphi authored and PatWie committed May 8, 2020
1 parent 6637301 commit 9f4cd8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions api/cronjob/submission_zipper.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ func (job *SubmissionFileZipper) Run() {
// touch generated/infomark-sheet{sheetID}-task{taskID}-group{groupID}-submissions.lock
// create generated/infomark-sheet{sheetID}-task{taskID}-group{groupID}-submissions.zip
// zip nested task
fmt.Println("Start zipping all submissions to:", job.Directory)

sheets, _ := job.Stores.Sheet.GetAll()

for _, sheet := range sheets {
Expand Down
2 changes: 1 addition & 1 deletion configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (config *ServerConfigurationSchema) HTTPAddr() string {
}
func (config *ServerConfigurationSchema) CronjobsZipSubmissionsIntervall() string {
secs := config.Cronjobs.ZipSubmissionsIntervall
return fmt.Sprintf("@ every %s", secs)
return fmt.Sprintf("@every %s", secs)
}

type WorkerConfigurationSchema struct {
Expand Down
2 changes: 1 addition & 1 deletion configuration/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestConfiguration(t *testing.T) {

config := &ServerConfigurationSchema{}
config.Cronjobs.ZipSubmissionsIntervall = 4 * time.Second
g.Assert(config.CronjobsZipSubmissionsIntervall()).Equal("@ every 4s")
g.Assert(config.CronjobsZipSubmissionsIntervall()).Equal("@every 4s")

})

Expand Down

0 comments on commit 9f4cd8c

Please sign in to comment.