()
| 154 | } |
| 155 | |
| 156 | func (cli *cliPapi) newSyncCmd() *cobra.Command { |
| 157 | cmd := &cobra.Command{ |
| 158 | Use: "sync", |
| 159 | Short: "Sync with the Polling API, pulling all non-expired orders for the instance", |
| 160 | Args: args.NoArgs, |
| 161 | DisableAutoGenTag: true, |
| 162 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 163 | cfg := cli.cfg() |
| 164 | ctx := cmd.Context() |
| 165 | |
| 166 | db, err := require.DBClient(ctx, cfg.DbConfig) |
| 167 | if err != nil { |
| 168 | return err |
| 169 | } |
| 170 | |
| 171 | return cli.sync(ctx, db) |
| 172 | }, |
| 173 | } |
| 174 | |
| 175 | return cmd |
| 176 | } |
no test coverage detected