Skip to content

Commit 04cfde5

Browse files
authored
Merge pull request #1873 from naomichi-y/feature/improve-ruby-performance
Improve ruby performance
2 parents 3506988 + 52d0a3b commit 04cfde5

5 files changed

Lines changed: 385 additions & 84 deletions

File tree

src/config/commandOptions.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ export default {
116116
type: "boolean",
117117
usage: "Turns on loading of your HTTP proxy settings from serverless.yml.",
118118
},
119+
rubyWatchDirs: {
120+
type: "string",
121+
usage:
122+
"Comma-separated list of directories to watch for Ruby (.rb) file changes. When set, the persistent Ruby process is automatically restarted on change for hot reload.",
123+
},
119124
terminateIdleLambdaTime: {
120125
type: "string",
121126
usage:

src/config/defaultOptions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default {
2323
preLoadModules: "",
2424
reloadHandler: false,
2525
resourceRoutes: false,
26+
rubyWatchDirs: [],
2627
terminateIdleLambdaTime: 60,
2728
useDocker: false,
2829
useInProcess: false,

src/lambda/handler-runner/HandlerRunner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default class HandlerRunner {
7979
if (supportedRuby.has(runtime)) {
8080
const { default: RubyRunner } = await import("./ruby-runner/index.js")
8181

82-
return new RubyRunner(this.#funOptions, this.#env)
82+
return new RubyRunner(this.#funOptions, this.#env, this.#options)
8383
}
8484

8585
if (supportedJava.has(runtime)) {

0 commit comments

Comments
 (0)