Skip to content

Commit

Permalink
feat(cron): use utils for time format
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoEb committed Oct 20, 2021
1 parent 152138d commit d648ef0
Show file tree
Hide file tree
Showing 35 changed files with 77 additions and 53 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Changelog

### To be Released
* feat(cron-task): Add fields to cron tasks list [#685](https://github.com/Scalingo/cli/pull/685)

### 1.21.1

* feat(deploy): add --no-follow flag to detach deployment logs [#679](https://github.com/Scalingo/cli/pull/679)
* build(deps): bump github.com/fatih/color from 1.12.0 to 1.13.0 [#680](https://github.com/Scalingo/cli/pull/680)
* fix(events): fix display for events new_autoscaler, edit_autoscaler and repeated_crash in timeline [#684](https://github.com/Scalingo/cli/pull/684)
* feat(cron-task): Add fields to cron tasks list [#685](https://github.com/Scalingo/cli/pull/685)

### 1.21.0

Expand Down
5 changes: 4 additions & 1 deletion crontasks/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"gopkg.in/errgo.v1"

"github.com/Scalingo/cli/config"
"github.com/Scalingo/cli/utils"
httpclient "github.com/Scalingo/go-scalingo/v4/http"
"github.com/Scalingo/go-utils/errors"
)
Expand All @@ -32,7 +33,9 @@ func List(app string) error {
t.SetHeader([]string{"Command", "Size", "Last execution", "Next execution"})

for _, job := range cronTasks.Jobs {
t.Append([]string{job.Command, job.Size, job.LastExecutionDate.Format("2006-01-02 15:04:05"), job.NextExecutionDate.Format("2006-01-02 15:04:05")})
t.Append([]string{job.Command, job.Size,
job.LastExecutionDate.Format(utils.TimeFormat),
job.NextExecutionDate.Format(utils.TimeFormat)})
}
t.Render()

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5
github.com/Scalingo/go-scalingo/v4 v4.14.2
github.com/Scalingo/go-scalingo/v4 v4.14.3
github.com/Scalingo/go-utils/errors v1.0.0
github.com/Scalingo/go-utils/retry v1.0.0
github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2
Expand Down
10 changes: 2 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C6
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5 h1:VauE2GcJNZFun2Och6tIT2zJZK1v6jxALQDA9BIji/E=
github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5/go.mod h1:gxOHeajFfvGQh/fxlC8oOKBe23xnnJTif00IFFbiT+o=
github.com/Scalingo/go-scalingo/v4 v4.14.1 h1:2QM7/TOaixLvp3+BsW8kR307LbFwzequzcZoqM/lCyU=
github.com/Scalingo/go-scalingo/v4 v4.14.1/go.mod h1:GHFZjiKGI3xC0igpx4CtRErBSUmMS0QI6sU080lEkKA=
github.com/Scalingo/go-scalingo/v4 v4.14.2-0.20211012092626-2b5c0dae107c h1:Yd/udfiixnp7xkAGv131v0ZTxvoAew5TiLnmHN2wP7A=
github.com/Scalingo/go-scalingo/v4 v4.14.2-0.20211012092626-2b5c0dae107c/go.mod h1:GHFZjiKGI3xC0igpx4CtRErBSUmMS0QI6sU080lEkKA=
github.com/Scalingo/go-scalingo/v4 v4.14.2-0.20211012094544-a3748506ae9d h1:JTBMFE1C+EKk8zYJFcOs/V2X3vONWDPFxvo9M8iYCNc=
github.com/Scalingo/go-scalingo/v4 v4.14.2-0.20211012094544-a3748506ae9d/go.mod h1:GHFZjiKGI3xC0igpx4CtRErBSUmMS0QI6sU080lEkKA=
github.com/Scalingo/go-scalingo/v4 v4.14.2 h1:+2lzo3o0R3rEKO7J9arfWKN1YztkS90SshwLlUVzzb0=
github.com/Scalingo/go-scalingo/v4 v4.14.2/go.mod h1:GHFZjiKGI3xC0igpx4CtRErBSUmMS0QI6sU080lEkKA=
github.com/Scalingo/go-scalingo/v4 v4.14.3 h1:RrEYCWTvD2R7JVFV21FZuJB+t0DZDJwyj6Mzxr1YdJ4=
github.com/Scalingo/go-scalingo/v4 v4.14.3/go.mod h1:GHFZjiKGI3xC0igpx4CtRErBSUmMS0QI6sU080lEkKA=
github.com/Scalingo/go-utils/errors v1.0.0 h1:9+1zBmT+d0kpAReChheUDX0AmT0/OtrDtHdwRymRufA=
github.com/Scalingo/go-utils/errors v1.0.0/go.mod h1:X1v0A4DBs4exBWGjYsGLo6nsC49vqf2hEVtigTRv7iY=
github.com/Scalingo/go-utils/retry v1.0.0 h1:aGT9Voe4rVEzn0bZ68x+nyBvk2sJWrzLP37+tTVdCuc=
Expand Down
4 changes: 4 additions & 0 deletions vendor/github.com/Scalingo/go-scalingo/v4/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions vendor/github.com/Scalingo/go-scalingo/v4/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions vendor/github.com/Scalingo/go-scalingo/v4/addons_providers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/apps.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/backups.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/container.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions vendor/github.com/Scalingo/go-scalingo/v4/cron_tasks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/databases.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/deployments.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/github.com/Scalingo/go-scalingo/v4/domains.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/events.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/events_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/log_drains.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/Scalingo/go-scalingo/v4/logs-archives.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/logs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/notifiers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/operations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/regions.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/run.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/Scalingo/go-scalingo/v4/signup.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d648ef0

Please sign in to comment.