outboxable 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1d39adee0b6d113feae798b6fd6a132e907ed882783d46d47b6b6fc658342f3
4
- data.tar.gz: 0b40c93e184d69c2ed91a549c69e98b4e842f82f1458539e28e94bafa78e2f73
3
+ metadata.gz: 405a1ea3f8e989c7aff0ed3ace6326f937d03b3b43ef43bd0806525c5395fa3b
4
+ data.tar.gz: bad9de902867a88ed19d6d3acafa47462802773b616e22b11519fda20a95cd38
5
5
  SHA512:
6
- metadata.gz: 9bfdc958c288ede25a0e009188d15724b623c7a2be6c4f4c27cde4723c3036d53d2265f39d2cb5366a71bddaff237bf3ef01ac3f11fcfd7e11efa6bfed7a5623
7
- data.tar.gz: 69896262919b22874de8b0c0c8c34d77d9830ffae7d46f4eb59e674191932872a753632d2eb99750c3306de47784c4452a1564e7ea2da30407e7f18653b968bb
6
+ metadata.gz: ea956b5ce9a35414f79358d93c4e97aac76daddadf58b8c08409c7ed4e35e1fd89f5e2a49fe412113e7b0cd80a1fb2adb2c58f792a589aba33f1cc18b8b7a32d
7
+ data.tar.gz: 219c292602a81fca5899bc7870cf390b2e20c3c38f9047f40620a8de23a2454b02f1e1eca168d3b64bdfb32dd45b747fac078cd7958e26601cac39d3ece56ff4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- outboxable (0.1.4)
4
+ outboxable (0.1.6)
5
5
  bunny (>= 2.19.0)
6
6
  connection_pool (~> 2.3.0)
7
7
 
@@ -7,8 +7,8 @@ module Outboxable
7
7
  Outbox.pending.where(last_attempted_at: [..Time.zone.now, nil]).find_in_batches(batch_size: 100).each do |batch|
8
8
  batch.each do |outbox|
9
9
  # This is to prevent a job from being retried too many times. Worst-case scenario is 1 minute delay in jobs.
10
- outbox.update(last_attempted_at: 1.minute.from_now)
11
10
  Outboxable::Worker.perform_async(outbox.id)
11
+ outbox.update(last_attempted_at: 1.minute.from_now, status: :processing)
12
12
  end
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Outboxable
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.6'
5
5
  end
@@ -6,7 +6,7 @@ class Outbox < ApplicationRecord
6
6
  before_save :check_publishing
7
7
  after_commit :publish, if: :allow_publish?
8
8
  # Enums
9
- enum status: { pending: 0, published: 1, failed: 2 }
9
+ enum status: { pending: 0, processing: 1, published: 2, failed: 3 }
10
10
  enum size: { single: 0, batch: 1 }
11
11
 
12
12
  # Validations
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outboxable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brusk Awat
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-06 00:00:00.000000000 Z
11
+ date: 2023-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny