belated 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3faf2091255e3a556c9abed02f3694bbbcd1bba9250621181745ef0708986d2d
4
- data.tar.gz: acbcd9dd1d921a22cb1242e5f2ec8713f4315e21a197176094433926c1cb9302
3
+ metadata.gz: 6b95920fe6206f0b3e71b6916e5509a734339273606a4caafc97ceef67fa3b15
4
+ data.tar.gz: 774c8a40d06c925f15369a4273e5b6981d8b0a0f0f90afc74e6b064f1a381a55
5
5
  SHA512:
6
- metadata.gz: 4066d54a8bd2d8e8a5a148bac5d2757081ed9d1778804f023561eade8f5a0b985357f807de545d5298fae39970c2f035545a2cdaac95b3e6534d490b5a0227a5
7
- data.tar.gz: df1f8c8dc6bcb6fa1e22e0a6ab430bb63d8e14b42a13500d7e185331d02f35a4b294642210f9581068f98ed213754064273a252c8526a303e1428e4155d2d24c
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
- - Initial release! :tada:
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
- ## [0.0.2] - 2021-07-15
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
- - Bugfix: was requiring byebug.
8
+ ## [0.1.0] - 2021-07-24
11
9
 
12
- ## [0.0.3] - 2021-07-16
10
+ - Gem name changed to Belated!
13
11
 
14
- - 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.
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
- ## [0.1.0] - 2021-07-24
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
- - Gem name changed to Belated!
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- belated (0.1.0)
4
+ belated (0.2.0)
5
5
  drb
6
6
  dry-configurable
7
7
 
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
- # Hardworker
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
- ~~Also, you lose all jobs if you restart the process.~~ It now uses YAML to load the queue into a file, which it then calls at startup to find the previous jobs.
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
- Hardworker runs on localhost, port 8788. Should probably make that a value you can change...
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
- $client = Belated::Client.new
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
- $client.perform_belated(job)
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/[USERNAME]/hardworker/blob/master/CODE_OF_CONDUCT.md).
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/[USERNAME]/hardworker/blob/master/CODE_OF_CONDUCT.md).
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).
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Belated
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
@@ -22,6 +22,8 @@ class Belated
22
22
  else
23
23
  pp job&.perform
24
24
  end
25
+ rescue StandardError => e
26
+ pp e.inspect
25
27
  end
26
28
  end
27
29
  end
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.1.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-24 00:00:00.000000000 Z
11
+ date: 2021-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: drb