Skip to content

Commit 1387c6d

Browse files
committed
Fix jobs qs
1 parent b3d4deb commit 1387c6d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

jobs/go/sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Open a new terminal window and run the multi app run template:
2828
output_match_mode: substring
2929
match_order: none
3030
background: false
31-
sleep: 120
31+
sleep: 100
3232
timeout_seconds: 180
3333
-->
3434

jobs/go/sdk/job-scheduler/job-scheduler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func get(droidJob DroidJob) (string, error) {
129129
}
130130

131131
//get job
132-
resp, err := app.daprClient.InvokeMethodWithContent(context.Background(), "job-service", "getJob", "GET", content)
132+
resp, err := app.daprClient.InvokeMethodWithContent(context.Background(), "job-service-sdk", "getJob", "GET", content)
133133
if err != nil {
134134
fmt.Println("Error invoking method: ", err)
135135
return "", err
@@ -145,7 +145,7 @@ func delete(droidJob DroidJob) error {
145145
Data: []byte(droidJob.Name),
146146
}
147147

148-
_, err := app.daprClient.InvokeMethodWithContent(context.Background(), "job-service", "deleteJob", "DELETE", content)
148+
_, err := app.daprClient.InvokeMethodWithContent(context.Background(), "job-service-sdk", "deleteJob", "DELETE", content)
149149
if err != nil {
150150
fmt.Println("Error invoking method: ", err)
151151
return err

jobs/go/sdk/job-service/job-service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func scheduleJob(ctx context.Context, in *common.InvocationEvent) (out *common.C
131131
// schedule job
132132
job := daprc.Job{
133133
Name: droidJob.Name,
134-
DueTime: droidJob.DueTime,
134+
DueTime: &droidJob.DueTime,
135135
Data: &anypb.Any{
136136
Value: content,
137137
},
@@ -204,7 +204,7 @@ func handleJob(ctx context.Context, job *common.JobEvent) error {
204204
if err := json.Unmarshal(job.Data, &jobData); err != nil {
205205
return fmt.Errorf("failed to unmarshal job: %v", err)
206206
}
207-
207+
208208
var jobPayload JobData
209209
if err := json.Unmarshal(job.Data, &jobPayload); err != nil {
210210
return fmt.Errorf("failed to unmarshal payload: %v", err)

0 commit comments

Comments
 (0)