Documentation ¶
Index ¶
- type CreateAsyncCallParams
- type DAL
- func (d *DAL) CreateAsyncCall(ctx context.Context, params CreateAsyncCallParams) (int64, error)
- func (d *DAL) DeleteCronJobsForDeployment(ctx context.Context, key model.DeploymentKey) error
- func (d *DAL) GetCronJobByKey(ctx context.Context, key model.CronJobKey) (model.CronJob, error)
- func (d *DAL) GetUnscheduledCronJobs(ctx context.Context, startTime time.Time) ([]model.CronJob, error)
- func (d *DAL) IsCronJobPending(ctx context.Context, key model.CronJobKey, startTime time.Time) (bool, error)
- func (d *DAL) UpdateCronJobExecution(ctx context.Context, params UpdateCronJobExecutionParams) error
- type UpdateCronJobExecutionParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateAsyncCallParams ¶
type CreateAsyncCallParams cronsql.CreateAsyncCallParams
type DAL ¶
func New ¶
func New(conn libdal.Connection) *DAL
func (*DAL) CreateAsyncCall ¶
CreateAsyncCall creates an async_call row and returns its id
func (*DAL) DeleteCronJobsForDeployment ¶ added in v0.383.1
func (*DAL) GetCronJobByKey ¶
GetCronJobByKey returns a cron_job row by its key
func (*DAL) GetUnscheduledCronJobs ¶
func (d *DAL) GetUnscheduledCronJobs(ctx context.Context, startTime time.Time) ([]model.CronJob, error)
GetUnscheduledCronJobs returns all cron_jobs rows with start_time before provided startTime for deployments with min replicas > 0 with no pending corresponding async_calls after last_execution
func (*DAL) IsCronJobPending ¶
func (d *DAL) IsCronJobPending(ctx context.Context, key model.CronJobKey, startTime time.Time) (bool, error)
IsCronJobPending returns whether this cron job is executing or scheduled in async_calls
func (*DAL) UpdateCronJobExecution ¶
func (d *DAL) UpdateCronJobExecution(ctx context.Context, params UpdateCronJobExecutionParams) error
UpdateCronJobExecution updates the last_async_call_id, last_execution, and next_execution of the cron job given by the provided key
type UpdateCronJobExecutionParams ¶
type UpdateCronJobExecutionParams cronsql.UpdateCronJobExecutionParams
Click to show internal directories.
Click to hide internal directories.