(command string, timeout uint)
| 355 | } |
| 356 | |
| 357 | func (r *Remote) ExecSQL(command string, timeout uint) error { |
| 358 | ctx, cancel := context.WithTimeout(context.Background(), time.Duration(timeout)*time.Second) |
| 359 | defer cancel() |
| 360 | |
| 361 | if _, err := r.Client.ExecContext(ctx, command); err != nil { |
| 362 | return err |
| 363 | } |
| 364 | if errors.Is(ctx.Err(), context.DeadlineExceeded) { |
| 365 | return buserr.New("ErrExecTimeOut") |
| 366 | } |
| 367 | |
| 368 | return nil |
| 369 | } |
| 370 | |
| 371 | func loadImageTag(database string) (string, error) { |
| 372 | var db model.Database |
no test coverage detected