sqewer 9.0.0 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/dependabot.yml +16 -0
- data/.github/workflows/main.yml +2 -2
- data/CHANGELOG.md +3 -0
- data/lib/sqewer/version.rb +1 -1
- data/lib/sqewer/worker.rb +8 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fd3e716de2cc1860f1c1638f8cfe0f21b965c82b0026c1315eb13c8668b5056
|
4
|
+
data.tar.gz: a727f9e4e226811b7553efe1daff8bda680ac03a61bc37f6c3c2020b410b7351
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 036f10c4debed8416fe639adcfc3e7f38d1e9fc4825f01892e98d518997823b7c1291f6ad51190d3f79f49027d843862b3b92f79c0f4da73f1bebbea3078e6c8
|
7
|
+
data.tar.gz: 0cc332e0f3ab31d02254356b33c3b097cf0700f259f87ed63734a61d9df47817b119fa3f7f8ddd427ed624ea1ee72b7bd0a25105127273392cb906693c520f21
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @WeTransfer/WeTransfer-CodeOwners
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
version: 2
|
3
|
+
updates:
|
4
|
+
- package-ecosystem: github-actions
|
5
|
+
directory: /
|
6
|
+
schedule:
|
7
|
+
interval: daily
|
8
|
+
time: "10:00"
|
9
|
+
timezone: Europe/Amsterdam
|
10
|
+
- package-ecosystem: bundler
|
11
|
+
directory: /
|
12
|
+
registries: "*"
|
13
|
+
schedule:
|
14
|
+
interval: daily
|
15
|
+
time: "09:00"
|
16
|
+
timezone: Europe/Amsterdam
|
data/.github/workflows/main.yml
CHANGED
@@ -19,14 +19,14 @@ jobs:
|
|
19
19
|
SQS_QUEUE_URL: 'sqlite3://tmp/sqewer.sqlite3'
|
20
20
|
AWS_REGION: 'eu-central-1'
|
21
21
|
steps:
|
22
|
-
- uses: actions/checkout@
|
22
|
+
- uses: actions/checkout@v4
|
23
23
|
- name: Set up Ruby
|
24
24
|
uses: ruby/setup-ruby@v1
|
25
25
|
with:
|
26
26
|
ruby-version: ${{ matrix.ruby }}
|
27
27
|
- name: install gems
|
28
28
|
run: |
|
29
|
-
gem install sqlite3
|
29
|
+
gem install sqlite3 -v '~> 1.0'
|
30
30
|
gem install bundler
|
31
31
|
bundle install --gemfile ${{ matrix.gemfile }}
|
32
32
|
- name: Tests
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
### 10.0.0
|
2
|
+
- Ensure all worker threads exit if a thread dies in case of an unhandled exception, to avoid "zombie" workers (running without any consumer thread)
|
3
|
+
|
1
4
|
### 9.0.0
|
2
5
|
- Add support for Ruby 3.2 and Rails 7
|
3
6
|
- Remove support for Ruby 2.6, 2.7 and Rails 5 and 6.0
|
data/lib/sqewer/version.rb
CHANGED
data/lib/sqewer/worker.rb
CHANGED
@@ -89,8 +89,14 @@ class Sqewer::Worker
|
|
89
89
|
@logger.info { '[worker] Starting with %d consumer threads' % @num_threads }
|
90
90
|
@execution_queue = Queue.new
|
91
91
|
|
92
|
-
|
92
|
+
# Ensure that unhandled exceptions inside threads make the worker fail,
|
93
|
+
# to avoid silent failures with no consumer threads running.
|
94
|
+
Thread.abort_on_exception = true
|
95
|
+
|
96
|
+
consumers = (1..@num_threads).each_with_index.map do |_, index|
|
93
97
|
Thread.new do
|
98
|
+
Thread.current[:role] = :consumer
|
99
|
+
Thread.current[:id] = index
|
94
100
|
loop { take_and_execute }
|
95
101
|
end
|
96
102
|
end
|
@@ -99,6 +105,7 @@ class Sqewer::Worker
|
|
99
105
|
# grab new messages and place them on the local queue.
|
100
106
|
owning_worker = self # self won't be self anymore in the thread
|
101
107
|
provider = Thread.new do
|
108
|
+
Thread.current[:role] = :provider
|
102
109
|
loop do
|
103
110
|
begin
|
104
111
|
break if stopping?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 10.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-sqs
|
@@ -246,9 +246,11 @@ executables:
|
|
246
246
|
extensions: []
|
247
247
|
extra_rdoc_files: []
|
248
248
|
files:
|
249
|
+
- ".github/CODEOWNERS"
|
249
250
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
250
251
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
251
252
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
253
|
+
- ".github/dependabot.yml"
|
252
254
|
- ".github/workflows/main.yml"
|
253
255
|
- ".gitignore"
|
254
256
|
- ".yardopts"
|
@@ -302,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
304
|
- !ruby/object:Gem::Version
|
303
305
|
version: '0'
|
304
306
|
requirements: []
|
305
|
-
rubygems_version: 3.
|
307
|
+
rubygems_version: 3.5.17
|
306
308
|
signing_key:
|
307
309
|
specification_version: 4
|
308
310
|
summary: Process jobs from SQS
|