()
| 98 | } |
| 99 | |
| 100 | func (cli *cliPapi) newStatusCmd() *cobra.Command { |
| 101 | cmd := &cobra.Command{ |
| 102 | Use: "status", |
| 103 | Short: "Get status of the Polling API", |
| 104 | Args: args.NoArgs, |
| 105 | DisableAutoGenTag: true, |
| 106 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 107 | cfg := cli.cfg() |
| 108 | ctx := cmd.Context() |
| 109 | |
| 110 | db, err := require.DBClient(ctx, cfg.DbConfig) |
| 111 | if err != nil { |
| 112 | return err |
| 113 | } |
| 114 | |
| 115 | return cli.Status(ctx, color.Output, db) |
| 116 | }, |
| 117 | } |
| 118 | |
| 119 | return cmd |
| 120 | } |
| 121 | |
| 122 | func (cli *cliPapi) sync(ctx context.Context, db *database.Client) error { |
| 123 | cfg := cli.cfg() |
no test coverage detected