roadrunner-server / roadrunner-plugins

📦 Home for the roadrunner plugins
MIT License
25 stars 9 forks source link

feat(pipes,sockets): allow running scripts in the server's command #62

Closed rustatian closed 2 years ago

rustatian commented 2 years ago

Reason for This PR

closes: https://github.com/spiral/roadrunner/issues/822 closes: #60

Description of Changes

The child inherits copies of the parent's set of open file descriptors.  
Each file descriptor in the child refers to the same open file description (see open(2)) as the corresponding file descriptor in the parent. 
This means that the two file descriptors share open file status flags, file offset, and signal-driven I/O attributes (see the description of F_SETOWN and F_SETSIG in fcntl(2)).

The script should start a worker as the last command. For the pipes, scripts should not contain programs, which can close stdin, stdout or stderr.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

PR Checklist

[Author TODO: Meet these criteria.] [Reviewer TODO: Verify that these criteria are met. Request changes if not]

codecov[bot] commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@a5b3b2b). Click here to learn what that means. The diff coverage is 60.41%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #62   +/-   ##
=========================================
  Coverage          ?   68.20%           
=========================================
  Files             ?      112           
  Lines             ?     9314           
  Branches          ?        0           
=========================================
  Hits              ?     6353           
  Misses            ?     2333           
  Partials          ?      628           
Impacted Files Coverage Δ
memory/memoryjobs/consumer.go 77.50% <0.00%> (ø)
service/config.go 68.75% <ø> (ø)
jobs/listener.go 38.59% <38.59%> (ø)
boltdb/boltjobs/listener.go 58.49% <66.66%> (ø)
server/plugin.go 67.64% <82.35%> (ø)
logger/config.go 75.80% <83.33%> (ø)
amqp/amqpjobs/listener.go 78.57% <100.00%> (ø)
beanstalk/connection.go 59.21% <100.00%> (ø)
beanstalk/listen.go 63.63% <100.00%> (ø)
jobs/plugin.go 63.27% <100.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a5b3b2b...0101c8b. Read the comment docs.