refactor: rename CronCommand to DokkuRunCommand
This better reflects what it does.
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -54,8 +54,8 @@ type TemplateCommand struct {
|
|||||||
Maintenance bool `json:"maintenance"`
|
Maintenance bool `json:"maintenance"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CronCommand returns the command to run for a given cron command
|
// DokkuRunCommand returns the dokku run command to execute for a given cron task
|
||||||
func (t TemplateCommand) CronCommand() string {
|
func (t TemplateCommand) DokkuRunCommand() string {
|
||||||
if t.AltCommand != "" {
|
if t.AltCommand != "" {
|
||||||
if t.LogFile != "" {
|
if t.LogFile != "" {
|
||||||
return fmt.Sprintf("%s &>> %s", t.AltCommand, 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
|
SHELL=/bin/bash
|
||||||
|
|
||||||
{{ range $task := .Commands -}}
|
{{ range $task := .Commands -}}
|
||||||
{{ $task.Schedule }} {{ $task.CronCommand }}
|
{{ $task.Schedule }} {{ $task.DokkuRunCommand }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
Reference in new issue
Block a user