cloudtasker 0.11.rc2 → 0.11.rc3

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: c5d91132bd3363bf3d7c08cd207b385f502eae3056be4734f73f60ef220f94c5
4
- data.tar.gz: fe935947d1ece340202d32eb54927336840ca236510a5044c2b1996c2161080d
3
+ metadata.gz: 60e17f257b39bf8d5651792bf7f4d27a6aa22307694881a3ee002d8228f719d7
4
+ data.tar.gz: ac58dfb7f5b65f2c76f437d5baa25b10ef8f3a7aa6aa95c3e1a815e10391fa80
5
5
  SHA512:
6
- metadata.gz: ed918a89e19dca6068f6c4d7b2aa0e55f838829f19741b1509edcbf3e03117e102454791efd808c5521da30e862d8cfc1d5969444cfb6ee250589e5b7dd281de
7
- data.tar.gz: d4fbb9afebcf84efb8bbe3f11b126aefc93a14c62d9d09b1a2f27186defb9c30ee0d28c13688b6bcc38411a3cbe8a736010fbea1a75e7dfa6334870e0522f2ff
6
+ metadata.gz: a3ed460f1298b3d3d70ef6bf761b2430a572c9dd50b4dc1f7f9a3cb8efed45aada429710da8b422e1a5d8a36c5a621f483f4401bf2f829674a94687c9e042334
7
+ data.tar.gz: d4d44ddee20abacedd2a5d06ed53d73af052419c73396706d822c5a70561ec4038e4817b0f6520024de33b869f92ded70b019b63d31a834f94a67114482f9abb
data/README.md CHANGED
@@ -12,6 +12,8 @@ Cloudtasker also provides optional modules for running [cron jobs](docs/CRON_JOB
12
12
 
13
13
  A local processing server is also available for development. This local server processes jobs in lieu of Cloud Tasks and allows you to work offline.
14
14
 
15
+ **Maturity**: This gem is production-ready. We at Keypup have already processed millions of jobs using Cloudtasker and all related extensions (cron, batch and unique jobs). I'm waiting till the end of 2020 before releasing the official `v1.0.0` in case we've missed any edge-case bug.
16
+
15
17
  ## Summary
16
18
 
17
19
  1. [Installation](#installation)
@@ -62,6 +62,10 @@ module Cloudtasker
62
62
  # @return [Cloudtasker::Batch::Job] The attached batch.
63
63
  #
64
64
  def self.for(worker)
65
+ # Load extension if not loaded already on the worker class
66
+ worker.class.include(Extension::Worker) unless worker.class <= Extension::Worker
67
+
68
+ # Add batch capability
65
69
  worker.batch = new(worker)
66
70
  end
67
71
 
@@ -16,6 +16,8 @@ module Cloudtasker
16
16
  Cloudtasker.configure do |config|
17
17
  config.server_middleware { |c| c.add(Middleware::Server) }
18
18
  end
19
+
20
+ # Inject worker extension on main module
19
21
  Cloudtasker::Worker.include(Extension::Worker)
20
22
  end
21
23
  end
@@ -5,15 +5,13 @@ module Cloudtasker
5
5
  class Engine < ::Rails::Engine
6
6
  isolate_namespace Cloudtasker
7
7
 
8
- # Setup cloudtasker processing route
9
- initializer 'cloudtasker', before: :load_config_initializers do
8
+ config.before_initialize do
9
+ # Mount cloudtasker processing endpoint
10
10
  Rails.application.routes.append do
11
11
  mount Cloudtasker::Engine, at: '/cloudtasker'
12
12
  end
13
- end
14
13
 
15
- # Setup active job adapter
16
- initializer 'cloudtasker.active_job', after: :load_config_initializers do
14
+ # Add ActiveJob adapter
17
15
  require 'active_job/queue_adapters/cloudtasker_adapter' if defined?(::ActiveJob::Railtie)
18
16
  end
19
17
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cloudtasker
4
- VERSION = '0.11.rc2'
4
+ VERSION = '0.11.rc3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudtasker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.rc2
4
+ version: 0.11.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Lachaume
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-23 00:00:00.000000000 Z
11
+ date: 2020-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport