refactor: rename CronCommand to DokkuRunCommand
This better reflects what it does.
This commit is contained in:
@@ -54,8 +54,8 @@ type TemplateCommand struct {
|
||||
Maintenance bool `json:"maintenance"`
|
||||
}
|
||||
|
||||
// CronCommand returns the command to run for a given cron command
|
||||
func (t TemplateCommand) CronCommand() string {
|
||||
// DokkuRunCommand returns the dokku run command to execute for a given cron task
|
||||
func (t TemplateCommand) DokkuRunCommand() string {
|
||||
if t.AltCommand != "" {
|
||||
if t.LogFile != "" {
|
||||
return fmt.Sprintf("%s &>> %s", t.AltCommand, t.LogFile)
|
||||
|
||||
@@ -8,5 +8,5 @@ PATH=/usr/local/bin:/usr/bin:/bin
|
||||
SHELL=/bin/bash
|
||||
|
||||
{{ range $task := .Commands -}}
|
||||
{{ $task.Schedule }} {{ $task.CronCommand }}
|
||||
{{ $task.Schedule }} {{ $task.DokkuRunCommand }}
|
||||
{{ end -}}
|
||||
|
||||
Reference in New Issue
Block a user