Skip to content

Commit

Permalink
[#35]: feature: send driver name to the PHP process
Browse files Browse the repository at this point in the history
  • Loading branch information
rustatian authored Jan 30, 2023
2 parents 6db24d8 + 858a55d commit 66e2811
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions memoryjobs/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
)

const (
pluginName string = "memory"
prefetch string = "prefetch"
goroutinesMax uint64 = 1000
)
Expand Down
9 changes: 8 additions & 1 deletion memoryjobs/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,16 @@ func (i *Item) Context() ([]byte, error) {
struct {
ID string `json:"id"`
Job string `json:"job"`
Driver string `json:"driver"`
Headers map[string][]string `json:"headers"`
Pipeline string `json:"pipeline"`
}{ID: i.Ident, Job: i.Job, Headers: i.Headers, Pipeline: i.Options.Pipeline},
}{
ID: i.Ident,
Job: i.Job,
Driver: pluginName,
Headers: i.Headers,
Pipeline: i.Options.Pipeline,
},
)

if err != nil {
Expand Down

0 comments on commit 66e2811

Please sign in to comment.