mirror of https://github.com/dapr/go-sdk.git
fix: stop schedule field from always being initialised (#597)
Signed-off-by: mikeee <hey@mike.ee>
This commit is contained in:
parent
967570515b
commit
77c213de61
|
@ -24,7 +24,7 @@ import (
|
||||||
|
|
||||||
type Job struct {
|
type Job struct {
|
||||||
Name string
|
Name string
|
||||||
Schedule string
|
Schedule string // Optional
|
||||||
Repeats uint32 // Optional
|
Repeats uint32 // Optional
|
||||||
DueTime string // Optional
|
DueTime string // Optional
|
||||||
TTL string // Optional
|
TTL string // Optional
|
||||||
|
@ -33,11 +33,10 @@ type Job struct {
|
||||||
|
|
||||||
// ScheduleJobAlpha1 raises and schedules a job.
|
// ScheduleJobAlpha1 raises and schedules a job.
|
||||||
func (c *GRPCClient) ScheduleJobAlpha1(ctx context.Context, job *Job) error {
|
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{
|
jobRequest := &pb.Job{
|
||||||
Name: job.Name,
|
Name: job.Name,
|
||||||
Schedule: &job.Schedule,
|
Data: job.Data,
|
||||||
Data: job.Data,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if job.Schedule != "" {
|
if job.Schedule != "" {
|
||||||
|
|
Loading…
Reference in New Issue