Skip to content

Commit

Permalink
Allow specifying microservices that don't need to PUT back to islandora
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Oct 2, 2024
1 parent bb897dc commit eccab9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/parry/scyllaridae.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ queueMiddlewares:
consumers: 3
- queueName: islandora-cache-warmer
url: http://cache-warmer:8080
consumers: 3
noPut: true
1 change: 1 addition & 0 deletions internal/config/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ type QueueMiddleware struct {
Url string `yaml:"url"`
Consumers int `yaml:"consumers"`
ForwardAuth bool `yaml:"forwardAuth,omitempty"`
NoPut bool `yaml:"noPut"`
}

// Command describes the command and arguments to execute for a specific MIME type.
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ func handleMessage(msg *stomp.Message, middleware scyllaridae.QueueMiddleware) {
return
}

if middleware.NoPut {
return
}

// Create a pipe to stream the data from resp.Body to the PUT request body
pr, pw := io.Pipe()
defer pr.Close()
Expand Down

0 comments on commit eccab9e

Please sign in to comment.