(ctx context.Context)
| 49 | } |
| 50 | |
| 51 | func (r *Runner) SetInstanceToPendingDelete(ctx context.Context) error { |
| 52 | instance, err := auth.InstanceParams(ctx) |
| 53 | if err != nil { |
| 54 | slog.With(slog.Any("error", err)).ErrorContext( |
| 55 | ctx, "failed to get instance params") |
| 56 | return runnerErrors.ErrUnauthorized |
| 57 | } |
| 58 | |
| 59 | updateParams := params.UpdateInstanceParams{ |
| 60 | Status: commonParams.InstancePendingDelete, |
| 61 | } |
| 62 | |
| 63 | if _, err := r.store.ForceUpdateInstance(r.ctx, instance.ID, updateParams); err != nil { |
| 64 | return fmt.Errorf("failed to set instance to pending_delete: %w", err) |
| 65 | } |
| 66 | return nil |
| 67 | } |
| 68 | |
| 69 | func (r *Runner) GetAgentJWTToken(ctx context.Context, runnerName string) (string, error) { |
| 70 | var instance params.Instance |
nothing calls this directly
no test coverage detected