belated 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -11
- data/Gemfile.lock +1 -1
- data/README.md +12 -8
- data/dummy/db/test.sqlite3 +0 -0
- data/lib/belated.rb +2 -1
- data/lib/belated/version.rb +1 -1
- data/lib/belated/worker.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b95920fe6206f0b3e71b6916e5509a734339273606a4caafc97ceef67fa3b15
|
4
|
+
data.tar.gz: 774c8a40d06c925f15369a4273e5b6981d8b0a0f0f90afc74e6b064f1a381a55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fea65e9066049c19b6f5b9acc338613a142c837f74bedbb86e6f696f312871a5804b551a022d570d343979f632929a4e6e3ca9a53da308ce4d125f6b69e7026d
|
7
|
+
data.tar.gz: 18527ddca7ec452049e4a3c6bfddf4031d9659edd8a1b6f0950ec45033ade4da4984877afc19c031aaa9b5ae3cf7aa66646cf40634bf49d7f1d3d0524efb1ef8
|
data/CHANGELOG.md
CHANGED
@@ -1,25 +1,32 @@
|
|
1
1
|
## [Unreleased]
|
2
|
-
## [0.0.1] - 2021-07-15
|
3
2
|
|
4
|
-
|
5
|
-
Things are almost working. You can enqueue jobs! That should be more than enough.
|
6
|
-
Rails integration to be done soon!
|
3
|
+
## [0.2.0] - 2021-07-25
|
7
4
|
|
8
|
-
|
5
|
+
- Workers now rescue StandardError and keep on working!
|
6
|
+
Note that they only rescue StandardError, and as there is no logger yet just pp the inspected error class.
|
9
7
|
|
10
|
-
|
8
|
+
## [0.1.0] - 2021-07-24
|
11
9
|
|
12
|
-
|
10
|
+
- Gem name changed to Belated!
|
13
11
|
|
14
|
-
|
15
|
-
- Also, now you can use classes! As long as the class has a perform-method.
|
12
|
+
Below are changes when this gem was named HardWorker:
|
16
13
|
|
17
14
|
## [0.0.4] - 2021-07-24
|
18
15
|
|
19
16
|
- Rails support!
|
20
17
|
- Banner (for Belated though...)
|
21
18
|
- Final release, as the name of this gem is going to change to Belated.
|
19
|
+
## [0.0.3] - 2021-07-16
|
22
20
|
|
23
|
-
|
21
|
+
- YAML Marshalled queue! So now the queue stays in memory even if restarted. Though kill and term signals still need catching.. that is not done yet.
|
22
|
+
- Also, now you can use classes! As long as the class has a perform-method.
|
24
23
|
|
25
|
-
|
24
|
+
## [0.0.2] - 2021-07-15
|
25
|
+
|
26
|
+
- Bugfix: was requiring byebug.
|
27
|
+
|
28
|
+
## [0.0.1] - 2021-07-15
|
29
|
+
|
30
|
+
- Initial release! :tada:
|
31
|
+
Things are almost working. You can enqueue jobs! That should be more than enough.
|
32
|
+
Rails integration to be done soon!
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# Belated
|
2
2
|
|
3
3
|
[![CodeFactor](https://www.codefactor.io/repository/github/sampokuokkanen/belated/badge)](https://www.codefactor.io/repository/github/sampokuokkanen/belated) [![Gem Version](https://badge.fury.io/rb/belated.svg)](https://badge.fury.io/rb/belated)
|
4
4
|
|
5
|
-
This is Belated, a new Ruby backend job library! It supports running procs and classes in the background.
|
6
|
-
|
5
|
+
This is Belated, a new Ruby backend job library! It supports running procs and classes in the background. To deal with restarts, it uses YAML to load the queue into a file, which it then calls at startup to find the previous jobs.
|
6
|
+
|
7
7
|
Note that Belated used to be called HardWorker. That name was already in use in Sidekiq documentation and a bit too generic anyway.
|
8
8
|
|
9
9
|
It uses dRuby to do the communication! Which is absolute great. No need for Redis or PostgreSQL, just Ruby standard libraries.
|
@@ -14,6 +14,9 @@ TODO LIST:
|
|
14
14
|
(Ended up using YAML)
|
15
15
|
- ~~Support Rails~~ (Supported!)
|
16
16
|
- ~~Parse options from command line, eg. `--workers 10`~~(Done!)
|
17
|
+
- Don't crash on errors
|
18
|
+
- Add a logger
|
19
|
+
- Make it possible to schedule jobs
|
17
20
|
- Maybe support ActiveJob?
|
18
21
|
- Have a web UI
|
19
22
|
- Do some performance testing
|
@@ -68,7 +71,8 @@ dummy.queue.push(proc { 2 / 1 })
|
|
68
71
|
dummy.queue.push(DumDum.new)
|
69
72
|
```
|
70
73
|
|
71
|
-
|
74
|
+
Belated runs on localhost, port 8788.
|
75
|
+
Going to make that an option in the future.
|
72
76
|
|
73
77
|
## Rails
|
74
78
|
|
@@ -77,14 +81,14 @@ First, start up Belated.
|
|
77
81
|
Then,
|
78
82
|
|
79
83
|
```ruby
|
80
|
-
|
84
|
+
client = Belated::Client.new
|
81
85
|
```
|
82
86
|
|
83
87
|
and you can use the client!
|
84
88
|
Call
|
85
89
|
|
86
90
|
```ruby
|
87
|
-
|
91
|
+
client.perform_belated(job)
|
88
92
|
```
|
89
93
|
|
90
94
|
If you want to pass a job to Belated.
|
@@ -124,7 +128,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
124
128
|
|
125
129
|
## Contributing
|
126
130
|
|
127
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/sampokuokkanen/belated. 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/
|
131
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sampokuokkanen/belated. 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/sampokuokkanen/belated/blob/master/CODE_OF_CONDUCT.md).
|
128
132
|
|
129
133
|
## License
|
130
134
|
|
@@ -132,4 +136,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
132
136
|
|
133
137
|
## Code of Conduct
|
134
138
|
|
135
|
-
Everyone interacting in the Belated project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
139
|
+
Everyone interacting in the Belated project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/sampokuokkanen/belated/blob/main/CODE_OF_CONDUCT.md).
|
data/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/lib/belated.rb
CHANGED
@@ -7,7 +7,6 @@ require 'yaml'
|
|
7
7
|
require 'singleton'
|
8
8
|
require 'dry-configurable'
|
9
9
|
require 'belated/client'
|
10
|
-
require 'belated/rails' if defined?(::Rails::Engine)
|
11
10
|
|
12
11
|
# Belated is a pure Ruby job backend.
|
13
12
|
# It has limited functionality, as it only accepts
|
@@ -145,3 +144,5 @@ class Belated
|
|
145
144
|
|
146
145
|
class Error < StandardError; end
|
147
146
|
end
|
147
|
+
|
148
|
+
require 'belated/rails' if defined?(::Rails::Engine)
|
data/lib/belated/version.rb
CHANGED
data/lib/belated/worker.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: belated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sampo Kuokkanen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: drb
|