fix: stop schedule field from always being initialised (#597)

Signed-off-by: mikeee <hey@mike.ee>
This commit is contained in:
Mike Nguyen 2024-07-22 20:19:53 +01:00 committed by GitHub
parent 967570515b
commit 77c213de61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 5 deletions

View File

@ -24,7 +24,7 @@ import (
type Job struct {
Name string
Schedule string
Schedule string // Optional
Repeats uint32 // Optional
DueTime string // Optional
TTL string // Optional
@ -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 != "" {