Skip to content

Commit

Permalink
fix: stop schedule field from always being initialised (#597)
Browse files Browse the repository at this point in the history
Signed-off-by: mikeee <hey@mike.ee>
  • Loading branch information
mikeee authored Jul 22, 2024
1 parent 9675705 commit 77c213d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/scheduling.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

type Job struct {
Name string
Schedule string
Schedule string // Optional
Repeats uint32 // Optional
DueTime string // Optional
TTL string // Optional
Expand All @@ -33,11 +33,10 @@ type Job struct {

// ScheduleJobAlpha1 raises and schedules a job.
func (c *GRPCClient) ScheduleJobAlpha1(ctx context.Context, job *Job) error {
// TODO: Assert job fields are defined: Name, Schedule, Data
// TODO: Assert job fields are defined: Name, Data
jobRequest := &pb.Job{
Name: job.Name,
Schedule: &job.Schedule,
Data: job.Data,
Name: job.Name,
Data: job.Data,
}

if job.Schedule != "" {
Expand Down

0 comments on commit 77c213d

Please sign in to comment.