lambda_punch 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +9 -9
- data/lambda_punch.gemspec +3 -3
- data/lib/lambda_punch/server.rb +1 -0
- data/lib/lambda_punch/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74d4ec4d6103a6d697959372f1adf7e5a13aca8b060c5376f1bf799ebabe3921
|
4
|
+
data.tar.gz: 817ea0235862699edcb95b4199c76b234579d67aa81874d64617bce324c942a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6f7e2783edf78142fe43ce52abf52a0a015bb94bb98752176138e4ad6d97cbb9f41ca0bb26187c075940f8f6b0cb1ab608691ced20a19f0ad04e9c0df746dd5
|
7
|
+
data.tar.gz: 6f96ee034a38cea5636c35d73c3afc0a5345131288cf28db926fec21e5317060bc5749e436d811056e7b4a0da3785070f278826752567f95b9d8176fd84b3e22
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
![LambdaPunch](https://user-images.githubusercontent.com/2381/123561512-c23fb580-d776-11eb-9780-71d606cd8f2c.png)
|
2
2
|
|
3
|
-
[![Test](https://github.com/
|
3
|
+
[![Test](https://github.com/rails-lambda/lambda_punch/actions/workflows/test.yml/badge.svg)](https://github.com/rails-lambda/lambda_punch/actions/workflows/test.yml)
|
4
4
|
|
5
5
|
# 👊 LambdaPunch
|
6
6
|
|
7
|
-
<a href="https://lamby.
|
7
|
+
<a href="https://lamby.cloud"><img src="https://raw.githubusercontent.com/rails-lambda/lamby/master/images/social2.png" alt="Lamby: Simple Rails & AWS Lambda Integration using Rack." align="right" width="450" style="margin-left:1rem;margin-bottom:1rem;" /></a>Asynchronous background job processing for AWS Lambda with Ruby using [Lambda Extensions](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html). Inspired by the [SuckerPunch](https://github.com/brandonhilkert/sucker_punch) gem but specifically tooled to work with Lambda's invoke model.
|
8
8
|
|
9
|
-
**For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/
|
9
|
+
**For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/rails-lambda/lambdakiq) gem. A drop-in replacement for [Sidekiq](https://github.com/mperham/sidekiq) when running Rails in AWS Lambda using the [Lamby](https://lamby.cloud/) gem.**
|
10
10
|
|
11
11
|
## 🏗 Architecture
|
12
12
|
|
@@ -24,7 +24,7 @@ Add this line to your project's `Gemfile` and then make sure to `bundle install`
|
|
24
24
|
gem 'lambda_punch'
|
25
25
|
```
|
26
26
|
|
27
|
-
Within your project or [Rails application's](https://lamby.
|
27
|
+
Within your project or [Rails application's](https://lamby.cloud/docs/anatomy) `Dockerfile`, add the following. Make sure you do this before you `COPY` your code. The idea is to implicitly use the default `USER root` since it needs permission to create an `/opt/extensions` directory.
|
28
28
|
|
29
29
|
```dockerfile
|
30
30
|
RUN gem install lambda_punch && lambda_punch install
|
@@ -36,7 +36,7 @@ LambdaPunch uses the `LAMBDA_TASK_ROOT` environment variable to find your projec
|
|
36
36
|
ENV LAMBDA_TASK_ROOT=/app
|
37
37
|
```
|
38
38
|
|
39
|
-
Installation with AWS Lambda via the [Lamby](https://lamby.
|
39
|
+
Installation with AWS Lambda via the [Lamby](https://lamby.cloud/) v4 (or higher) gem can be done using Lamby's `handled_proc` config. For example, appends these to your `config/environments/production.rb` file. Here we are ensuring that the LambdaPunch DRb server is running and that after each Lamby request we notify LambdaPunch.
|
40
40
|
|
41
41
|
```ruby
|
42
42
|
config.to_prepare { LambdaPunch.start_server! }
|
@@ -78,7 +78,7 @@ end
|
|
78
78
|
|
79
79
|
### ActiveJob
|
80
80
|
|
81
|
-
You can use LambdaPunch with Rails' ActiveJob. **For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/
|
81
|
+
You can use LambdaPunch with Rails' ActiveJob. **For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/rails-lambda/lambdakiq) gem.**
|
82
82
|
|
83
83
|
```ruby
|
84
84
|
config.active_job.queue_adapter = :lambda_punch
|
@@ -90,7 +90,7 @@ Your function's timeout is the max amount to handle the request and process all
|
|
90
90
|
|
91
91
|
If your application integrates with API Gateway (which has a 30 second timeout) then it is possible your function can be set with a higher timeout to perform background work. Since work is done after each invoke, the LambdaPunch queue should be empty when your function receives the `SHUTDOWN` event. If jobs are in the queue when this happens they will have two seconds max to work them down before being lost.
|
92
92
|
|
93
|
-
**For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/
|
93
|
+
**For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/rails-lambda/lambdakiq) gem.**
|
94
94
|
|
95
95
|
### Logging
|
96
96
|
|
@@ -140,7 +140,7 @@ You can also run the `./bin/console` command for an interactive prompt within th
|
|
140
140
|
|
141
141
|
## 💖 Contributing
|
142
142
|
|
143
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
143
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rails-lambda/lambda_punch. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/rails-lambda/lambda_punch/blob/main/CODE_OF_CONDUCT.md).
|
144
144
|
|
145
145
|
## 👩⚖️ License
|
146
146
|
|
@@ -148,4 +148,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
148
148
|
|
149
149
|
## 🤝 Code of Conduct
|
150
150
|
|
151
|
-
Everyone interacting in the LambdaPunch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
151
|
+
Everyone interacting in the LambdaPunch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rails-lambda/lambda_punch/blob/main/CODE_OF_CONDUCT.md).
|
data/lambda_punch.gemspec
CHANGED
@@ -7,11 +7,11 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.email = ["ken@metaskills.net"]
|
8
8
|
spec.summary = "LambdaPunch: Async Processing using Lambda Extensions"
|
9
9
|
spec.description = "LambdaPunch: Async Processing using Lambda Extensions"
|
10
|
-
spec.homepage = "https://github.com/
|
10
|
+
spec.homepage = "https://github.com/rails-lambda/lambda_punch"
|
11
11
|
spec.license = "MIT"
|
12
12
|
spec.metadata["homepage_uri"] = spec.homepage
|
13
|
-
spec.metadata["source_code_uri"] = "https://github.com/
|
14
|
-
spec.metadata["changelog_uri"] = "https://github.com/
|
13
|
+
spec.metadata["source_code_uri"] = "https://github.com/rails-lambda/lambda_punch"
|
14
|
+
spec.metadata["changelog_uri"] = "https://github.com/rails-lambda/lambda_punch/blob/main/CHANGELOG.md"
|
15
15
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
16
16
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features|images)/}) }
|
17
17
|
end
|
data/lib/lambda_punch/server.rb
CHANGED
data/lib/lambda_punch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lambda_punch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -146,13 +146,13 @@ files:
|
|
146
146
|
- lib/lambda_punch/tasks/install.rake
|
147
147
|
- lib/lambda_punch/version.rb
|
148
148
|
- lib/lambda_punch/worker.rb
|
149
|
-
homepage: https://github.com/
|
149
|
+
homepage: https://github.com/rails-lambda/lambda_punch
|
150
150
|
licenses:
|
151
151
|
- MIT
|
152
152
|
metadata:
|
153
|
-
homepage_uri: https://github.com/
|
154
|
-
source_code_uri: https://github.com/
|
155
|
-
changelog_uri: https://github.com/
|
153
|
+
homepage_uri: https://github.com/rails-lambda/lambda_punch
|
154
|
+
source_code_uri: https://github.com/rails-lambda/lambda_punch
|
155
|
+
changelog_uri: https://github.com/rails-lambda/lambda_punch/blob/main/CHANGELOG.md
|
156
156
|
post_install_message:
|
157
157
|
rdoc_options: []
|
158
158
|
require_paths:
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
|
-
rubygems_version: 3.2.
|
171
|
+
rubygems_version: 3.2.3
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: 'LambdaPunch: Async Processing using Lambda Extensions'
|