Support AWS Lambda custom runtime (#305)
* environment variable to disable handling of SIGPIPE * rename env variable to BABASHKA_DISABLE_PIPE_HANDLER
This commit is contained in:
parent
ce028644fc
commit
b14d239ebb
2 changed files with 6 additions and 1 deletions
|
|
@ -1104,6 +1104,10 @@ $ docker run --rm script 1 2 3
|
|||
Your command line args: (1 2 3)
|
||||
```
|
||||
|
||||
## Package babashka script as a AWS Lambda
|
||||
|
||||
AWS Lambda runtime doesn't support signals, therefore babashka has to disable handling of the SIGPIPE. This can be done by setting `BABASHKA_DISABLE_PIPE_HANDLER` to `true`.
|
||||
|
||||
## Thanks
|
||||
|
||||
- [adgoji](https://www.adgoji.com/) for financial support
|
||||
|
|
|
|||
|
|
@ -289,7 +289,8 @@ Everything after that is bound to *command-line-args*."))
|
|||
|
||||
(defn main
|
||||
[& args]
|
||||
(handle-pipe!)
|
||||
(when-not (Boolean/valueOf ^String (System/getenv "BABASHKA_DISABLE_PIPE_HANDLER"))
|
||||
(handle-pipe!))
|
||||
#_(binding [*out* *err*]
|
||||
(prn "M" (meta (get bindings 'future))))
|
||||
(binding [*unrestricted* true]
|
||||
|
|
|
|||
Loading…
Reference in a new issue