summaryrefslogtreecommitdiff
path: root/plugins/jobs/rpc.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-14 11:35:12 +0300
committerValery Piashchynski <[email protected]>2021-07-14 11:35:12 +0300
commitd099e47ab28dd044d34e18347a4c714b8af3d612 (patch)
treee106e13bba48e435b87d218237b282d7f691b52c /plugins/jobs/rpc.go
parentec7c049036d31fe030d106db9f0d268ea0296c5f (diff)
SQS driver.
Fix isssues in the AMQP driver. Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/rpc.go')
-rw-r--r--plugins/jobs/rpc.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/jobs/rpc.go b/plugins/jobs/rpc.go
index 0bb94fa4..a2bd9c6d 100644
--- a/plugins/jobs/rpc.go
+++ b/plugins/jobs/rpc.go
@@ -2,7 +2,7 @@ package jobs
import (
"github.com/spiral/errors"
- "github.com/spiral/roadrunner/v2/plugins/jobs/structs"
+ "github.com/spiral/roadrunner/v2/plugins/jobs/job"
"github.com/spiral/roadrunner/v2/plugins/logger"
jobsv1beta "github.com/spiral/roadrunner/v2/proto/jobs/v1beta"
)
@@ -49,7 +49,7 @@ func (r *rpc) PushBatch(j *jobsv1beta.PushBatchRequest, _ *jobsv1beta.Empty) err
l := len(j.GetJobs())
- batch := make([]*structs.Job, l)
+ batch := make([]*job.Job, l)
for i := 0; i < l; i++ {
// convert transport entity into domain
@@ -93,19 +93,19 @@ func (r *rpc) List(_ *jobsv1beta.Empty, resp *jobsv1beta.List) error {
}
// from converts from transport entity to domain
-func (r *rpc) from(j *jobsv1beta.Job) *structs.Job {
+func (r *rpc) from(j *jobsv1beta.Job) *job.Job {
headers := map[string][]string{}
for k, v := range j.GetHeaders() {
headers[k] = v.GetValue()
}
- jb := &structs.Job{
+ jb := &job.Job{
Job: j.GetJob(),
Headers: headers,
Ident: j.GetId(),
Payload: j.GetPayload(),
- Options: &structs.Options{
+ Options: &job.Options{
Priority: j.GetOptions().GetPriority(),
Pipeline: j.GetOptions().GetPipeline(),
Delay: j.GetOptions().GetDelay(),