Skip to content

Commit

Permalink
Update to latest cron lib. (#17)
Browse files Browse the repository at this point in the history
* Update to latest cron lib.

Signed-off-by: Artur Souza <[email protected]>

* Implement DeleteReminder

Signed-off-by: Artur Souza <[email protected]>

* Fix IT for cron after internal schema change in etcd store.

Signed-off-by: Artur Souza <[email protected]>

* Fix IT for scheduler.

Signed-off-by: Artur Souza <[email protected]>

* Update cmd/daprd/options/options.go

Co-authored-by: Cassie Coyle <[email protected]>
Signed-off-by: Artur Souza <[email protected]>

* Use "@every" to convert period to schedule.

Signed-off-by: Artur Souza <[email protected]>

* Add GetJob again and assume namespace in metadata.
Other comments.

Signed-off-by: Artur Souza <[email protected]>

* Address comments.

Signed-off-by: Artur Souza <[email protected]>

* remove debug line.

Signed-off-by: Artur Souza <[email protected]>

* Don't double close etcd.

Signed-off-by: Artur Souza <[email protected]>

---------

Signed-off-by: Artur Souza <[email protected]>
Co-authored-by: Cassie Coyle <[email protected]>
  • Loading branch information
artursouza and cicoyle committed May 24, 2024
1 parent d429070 commit d4c750b
Show file tree
Hide file tree
Showing 30 changed files with 1,099 additions and 1,927 deletions.
8 changes: 1 addition & 7 deletions cmd/daprd/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ type Options struct {
AppChannelAddress string
Logger logger.Options
Metrics *metrics.Options

schedulerAddressFlag string
}

func New(origArgs []string) (*Options, error) {
Expand Down Expand Up @@ -134,7 +132,6 @@ func New(origArgs []string) (*Options, error) {
fs.StringVar(&opts.SentryAddress, "sentry-address", "", "Address for the Sentry CA service")
fs.StringVar(&opts.ControlPlaneTrustDomain, "control-plane-trust-domain", "localhost", "Trust domain of the Dapr control plane")
fs.StringVar(&opts.ControlPlaneNamespace, "control-plane-namespace", "default", "Namespace of the Dapr control plane")
fs.StringVar(&opts.schedulerAddressFlag, "scheduler-host-address", "", "Addresses for Dapr Scheduler servers")
fs.StringVar(&opts.AllowedOrigins, "allowed-origins", cors.DefaultAllowedOrigins, "Allowed HTTP origins")
fs.BoolVar(&opts.EnableProfiling, "enable-profiling", false, "Enable profiling")
fs.BoolVar(&opts.RuntimeVersion, "version", false, "Prints the runtime version")
Expand Down Expand Up @@ -166,6 +163,7 @@ func New(origArgs []string) (*Options, error) {
// --placement-host-address is a legacy (but not deprecated) flag that is translated to the actors-service flag
var placementServiceHostAddr string
fs.StringVar(&placementServiceHostAddr, "placement-host-address", "", "Addresses for Dapr Actor Placement servers (overrides actors-service)")
fs.StringVar(&opts.SchedulerAddress, "scheduler-host-address", "", "Addresses of the Scheduler service instance(s), as comma separated host:port pairs")
fs.StringVar(&opts.ActorsService, "actors-service", "", "Type and address of the actors service, in the format 'type:address'")
fs.StringVar(&opts.RemindersService, "reminders-service", "", "Type and address of the reminders service, in the format 'type:address'")

Expand Down Expand Up @@ -248,10 +246,6 @@ func New(origArgs []string) (*Options, error) {
opts.DaprBlockShutdownDuration = nil
}

if fs.Changed("scheduler-host-address") {
opts.SchedulerAddress = opts.schedulerAddressFlag
}

return &opts, nil
}

Expand Down
33 changes: 9 additions & 24 deletions dapr/proto/runtime/v1/dapr.proto
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,11 @@ service Dapr {
// Create and schedule a job
rpc ScheduleJob(ScheduleJobRequest) returns (google.protobuf.Empty) {}

// Delete a job
rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {}

// Get a job
// Gets a scheduled job
rpc GetJob(GetJobRequest) returns (GetJobResponse) {}

// List all jobs by app
rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {}
// Delete a job
rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {}
}

// InvokeServiceRequest represents the request message for Service invocation.
Expand Down Expand Up @@ -1149,32 +1146,20 @@ message ScheduleJobRequest {
Job job = 1;
}

// DeleteJobRequest is the message to delete the job by name.
message DeleteJobRequest {
// The name of the job.
string name = 1;
}

// GetJobRequest is the message to get the job by name.
// GetJobRequest is the message to retrieve a job.
message GetJobRequest {
// The name of the job.
string name = 1;
}

// GetJobResponse is the response message to convey the job.
// GetJobResponse is the message's response for a job retrieved.
message GetJobResponse {
// The job details.
Job job = 1;
}

// ListJobsRequest is the message to list jobs by app_id.
message ListJobsRequest {
// The id of the application (app_id) for which to list jobs.
string app_id = 1;
}

// ListJobsResponse is the response message to convey the list of jobs.
message ListJobsResponse {
// List of jobs that match the request criteria.
repeated Job jobs = 1;
// DeleteJobRequest is the message to delete the job by name.
message DeleteJobRequest {
// The name of the job.
string name = 1;
}
41 changes: 17 additions & 24 deletions dapr/proto/scheduler/v1/scheduler.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ option go_package = "github.com/dapr/dapr/pkg/proto/scheduler/v1;scheduler";
service Scheduler {
// ScheduleJob is used by the daprd sidecar to schedule a job.
rpc ScheduleJob(ScheduleJobRequest) returns (ScheduleJobResponse) {}
// Get a job
rpc GetJob(GetJobRequest) returns (GetJobResponse) {}
// DeleteJob is used by the daprd sidecar to delete a job.
rpc DeleteJob(JobRequest) returns (DeleteJobResponse) {}
// GetJob is used by the daprd sidecar to get details of a job.
rpc GetJob(JobRequest) returns (GetJobResponse) {}
// ListJobs is used by the daprd sidecar to list jobs by app_id.
rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {}
rpc DeleteJob(DeleteJobRequest) returns (DeleteJobResponse) {}

// WatchJob is used by the daprd sidecar to connect to the Scheduler
// service to watch for jobs triggering back.
Expand Down Expand Up @@ -56,41 +54,36 @@ message ScheduleJobRequest {
// The job to be scheduled.
runtime.v1.Job job = 1;

// Namespace of the job
string namespace = 2;

// The metadata associated with the job.
// The sidecar will create the unique `key` for storing data in the state store and pass the generated `key` along to the scheduler service for data lookup upon ‘trigger’ time later on.
// The sidecar will also add metadata in order to know whether this job is registered for an actor. This is needed, as the routing mechanism for actors is different for the callback.
map<string,string> metadata = 3;
map<string,string> metadata = 2;
}

message ScheduleJobResponse {
// Empty as of now
}

// JobRequest is the message used by the daprd sidecar to delete or get a job.
message JobRequest {
// GetJobRequest is the message used by the daprd sidecar to delete or get a job.
message GetJobRequest {
string job_name = 1;
}

message DeleteJobResponse {
// Empty as of now
// The metadata associated with the job.
map<string,string> metadata = 2;
}

// GetJobResponse is the response message to convey the details of a job.
message GetJobResponse {
runtime.v1.Job job = 1;
}

// ListJobsRequest is the message to list jobs by app_id.
message ListJobsRequest {
// The id of the application (app_id) for which to list jobs.
string app_id = 1;
// DeleteJobRequest is the message used by the daprd sidecar to delete or get a job.
message DeleteJobRequest {
string job_name = 1;

// The metadata associated with the job.
map<string,string> metadata = 2;
}
// ListJobsResponse is the response message to convey the list of jobs.
message ListJobsResponse {
// List of jobs that match the request criteria.
repeated runtime.v1.Job jobs = 1;

message DeleteJobResponse {
// Empty as of now
}

33 changes: 0 additions & 33 deletions dapr/proto/scheduler/v1/scheduler_callback.proto

This file was deleted.

7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ require (
contrib.go.opencensus.io/exporter/prometheus v0.4.2
github.com/PaesslerAG/jsonpath v0.1.1
github.com/PuerkitoBio/purell v1.2.1
github.com/Scalingo/go-etcd-cron v1.3.2
github.com/alphadose/haxmap v1.3.1
github.com/argoproj/argo-rollouts v1.4.1
github.com/cenkalti/backoff/v4 v4.2.1
github.com/cloudevents/sdk-go/v2 v2.14.0
github.com/dapr/components-contrib v1.13.0-rc.10
github.com/dapr/kit v0.13.0
github.com/diagridio/go-etcd-cron v0.0.0-20240321201514-c0f44b7f5d89
github.com/evanphx/json-patch/v5 v5.8.1
github.com/go-chi/chi/v5 v5.0.11
github.com/go-chi/cors v1.2.1
Expand Down Expand Up @@ -280,7 +280,6 @@ require (
github.com/http-wasm/http-wasm-host-go v0.5.1 // indirect
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible // indirect
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.56 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/influxdata/influxdb-client-go/v2 v2.12.3 // indirect
Expand Down Expand Up @@ -484,12 +483,14 @@ replace (
// check for retracted versions: go list -mod=mod -f '{{if .Retracted}}{{.}}{{end}}' -u -m all
replace github.com/microcosm-cc/bluemonday => github.com/microcosm-cc/bluemonday v1.0.24

// Needed due to a deprecated method used in functional tests
replace github.com/stretchr/testify => github.com/stretchr/testify v1.8.4

// Uncomment for local development for testing with changes in the components-contrib && kit repositories.
// Don't commit with this uncommented!
//
// replace github.com/dapr/components-contrib => ../components-contrib
// replace github.com/dapr/kit => ../kit
replace github.com/Scalingo/go-etcd-cron => github.com/cicoyle/go-etcd-cron v0.0.0-20240212132024-691d2e9fb3f1

//replace github.com/Scalingo/go-etcd-cron => ../go-etcd-cron

Expand Down
23 changes: 3 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,6 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/cicoyle/go-etcd-cron v0.0.0-20240212132024-691d2e9fb3f1 h1:u2JCV1Y2DpQ1cULuNzbz2dYl1onJ5eZBus8DWFgH28I=
github.com/cicoyle/go-etcd-cron v0.0.0-20240212132024-691d2e9fb3f1/go.mod h1:h4rx0m29dWSqSm9Oikw83ldkxyeXKH19aAlj4vagiek=
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
Expand Down Expand Up @@ -467,6 +465,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
github.com/diagridio/go-etcd-cron v0.0.0-20240321201514-c0f44b7f5d89 h1:mcF9KZDBpLjzO6XIiV6bBg6R2VxPzf8F5RuXgwBjA08=
github.com/diagridio/go-etcd-cron v0.0.0-20240321201514-c0f44b7f5d89/go.mod h1:tRZ3z7Mr4Rp9fYdxmCB63V7zrwqtUINR6QHriC1bauw=
github.com/didip/tollbooth/v7 v7.0.1 h1:TkT4sBKoQoHQFPf7blQ54iHrZiTDnr8TceU+MulVAog=
github.com/didip/tollbooth/v7 v7.0.1/go.mod h1:VZhDSGl5bDSPj4wPsih3PFa4Uh9Ghv8hgacaTm5PRT4=
github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA=
Expand Down Expand Up @@ -967,8 +967,6 @@ github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.56 h1:ULzGSSe95hkOdh17NsiPV3lw
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.56/go.mod h1:bsqx6o47Kl4YsniIjPwuoeqiIB5Fc3JbSpB2b3o3WFQ=
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI=
github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
Expand Down Expand Up @@ -1555,25 +1553,11 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
Expand Down Expand Up @@ -2409,7 +2393,6 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
40 changes: 33 additions & 7 deletions pkg/actors/actors.go
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,8 @@ func (a *actorsRuntime) doExecuteReminderOrTimer(ctx context.Context, reminder *
func (a *actorsRuntime) CreateReminder(ctx context.Context, req *CreateReminderRequest) error {
if a.scheduler != nil {
metadata := map[string]string{
"scope": "actor",
"namespace": a.actorsConfig.Namespace,
"appId": a.actorsConfig.AppID,
"actorType": req.ActorType,
"actorId": req.ActorID,
Expand All @@ -1203,6 +1205,7 @@ func (a *actorsRuntime) CreateReminder(ctx context.Context, req *CreateReminderR
}

jobName := constructCompositeKey(
a.actorsConfig.Namespace,
"reminder",
req.ActorType,
req.ActorID,
Expand All @@ -1214,21 +1217,18 @@ func (a *actorsRuntime) CreateReminder(ctx context.Context, req *CreateReminderR
return err
}

// TODO: change the 3rd party library to take our format
jobSchedule := "@every " + req.Period
internalScheduleJobReq := &schedulerv1pb.ScheduleJobRequest{
Job: &runtimev1pb.Job{
Name: a.actorsConfig.AppID + "||" + jobName,
Schedule: jobSchedule,
Name: jobName,
Schedule: "@every " + req.Period,
Data: &anypb.Any{
TypeUrl: "type.googleapis.com/google.protobuf.BytesValue",
Value: data,
Value: data, // TODO: this should go to actorStateStore
},
DueTime: req.DueTime,
Ttl: req.TTL,
},
Namespace: "", // TODO
Metadata: metadata, // TODO: this should generate key if jobStateStore is configured
Metadata: metadata,
}

_, err = a.scheduler.ScheduleJob(ctx, internalScheduleJobReq)
Expand Down Expand Up @@ -1262,6 +1262,32 @@ func (a *actorsRuntime) CreateTimer(ctx context.Context, req *CreateTimerRequest
}

func (a *actorsRuntime) DeleteReminder(ctx context.Context, req *DeleteReminderRequest) error {
if a.scheduler != nil {
metadata := map[string]string{
"scope": "actor",
"namespace": a.actorsConfig.Namespace,
"appId": a.actorsConfig.AppID,
"actorType": req.ActorType,
"actorId": req.ActorID,
}

jobName := constructCompositeKey(
a.actorsConfig.Namespace,
"reminder",
req.ActorType,
req.ActorID,
req.Name,
)

internalDeleteJobReq := &schedulerv1pb.DeleteJobRequest{
JobName: jobName,
Metadata: metadata,
}

_, err := a.scheduler.DeleteJob(ctx, internalDeleteJobReq)
return err
}

if !a.actorsConfig.Config.HostedActorTypes.IsActorTypeHosted(req.ActorType) {
return ErrReminderOpActorNotHosted
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/actors/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type ConfigOpts struct {
AppID string
ActorsService string
RemindersService string
SchedulerService string
SchedulerAddress string
Port int
Namespace string
AppConfig daprAppConfig.ApplicationConfig
Expand All @@ -59,7 +59,7 @@ func NewConfig(opts ConfigOpts) Config {
AppID: opts.AppID,
ActorsService: opts.ActorsService,
RemindersService: opts.RemindersService,
SchedulerService: opts.SchedulerService,
SchedulerService: opts.SchedulerAddress,
Port: opts.Port,
Namespace: opts.Namespace,
DrainRebalancedActors: opts.AppConfig.DrainRebalancedActors,
Expand Down
Loading

0 comments on commit d4c750b

Please sign in to comment.