thecore_background_jobs 2.0.10 → 2.1.3

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: 6d7501d7ea472ace89797e67187b1d5b972ed518273f8507abe12507fb4bf2d7
4
- data.tar.gz: cd1d63cdc2d6e2903b4ed5c85a1a5c667fc103f5b741ef8155957be5eba3cdf4
3
+ metadata.gz: 61c3962d25b704d9e9a0bd5d1e093c2049217c6faa5df28a859fdb3094c5faf0
4
+ data.tar.gz: 9c1e9c3496a776b2ac46d15bcb56f194328575f09f1abbec226c80559350d1cd
5
5
  SHA512:
6
- metadata.gz: 3312b147a1339e5da810e59913995e3bcd586c2b96a466d59c3e0d8abff0f26325a5754809df9ba93596ec20cf08f7596b7cdd2a30a4d86e5dcde37cd23ec246
7
- data.tar.gz: 7563a79bc4c3045ba54139c75e17bea62669ee7c6909f8f7392089cc1c3994674ee673ebb8244b95536f49347bd6d77b1063285bb3b91e81eb5e8d28df23f61f
6
+ metadata.gz: bc0555bc400b48ac30591411999ecc408edcdcb54e2ad1350baaed354ccc3b18648289ae789c087da38cc23b9509d7f84987c1ab9b75c22660cb6d0f2c0b7bd4
7
+ data.tar.gz: 5e8cced916d8722f2d26dc2edfcbb3e0e7fa37164d73fe9972369178e60ff3517f02fdc86d2ff33dec686121d164fec9357bd69967ffebd28470311e123b5cb0
@@ -0,0 +1,10 @@
1
+ # require 'sidekiq'
2
+
3
+ # current_db = rand(1..15)
4
+
5
+ # Sidekiq.configure_server do |config|
6
+ # config.redis = { :namespace => "#{ENV['COMPOSE_PROJECT_NAME'] || 'notset'}", :url => "#{ENV['REDIS_URL']}/#{current_db}" }
7
+ # end
8
+ # Sidekiq.configure_client do |config|
9
+ # config.redis = { :namespace => "#{ENV['COMPOSE_PROJECT_NAME'] || 'notset'}", :url => "#{ENV['REDIS_URL']}/#{current_db}" }
10
+ # end
data/config/routes.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  Rails.application.routes.draw do
2
2
  require 'sidekiq/web'
3
+ require 'sidekiq-scheduler/web'
3
4
 
4
5
  # Allow any authenticated User with admin capability
5
6
  authenticate :user, lambda { |u| u.admin? } do
@@ -1,4 +1,5 @@
1
1
  require 'thecore_backend_commons'
2
+ require 'redis-namespace'
2
3
  require 'sidekiq'
3
4
  require "sidekiq-scheduler"
4
5
  require "sidekiq-failures"
@@ -6,4 +7,12 @@ require "thecore_background_jobs/engine"
6
7
 
7
8
  module ThecoreBackgroundJobs
8
9
  # Your code goes here...
10
+ def self.email_setup
11
+ delivery_options = { domain: Settings.ns(:smtp).domain, address: Settings.ns(:smtp).address, port: Settings.ns(:smtp).port.to_i, enable_starttls_auto: (Settings.ns(:smtp).enable_starttls_auto == "true")}
12
+ # Other Options
13
+ delivery_options.merge!({user_name: Settings.ns(:smtp).user_name}) unless Settings.ns(:smtp).user_name.blank?
14
+ delivery_options.merge!({password: Settings.ns(:smtp).password}) unless Settings.ns(:smtp).password.blank?
15
+ delivery_options.merge!({authentication: Settings.ns(:smtp).authentication}) unless Settings.ns(:smtp).authentication.blank?
16
+ delivery_options
17
+ end
9
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_background_jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-21 00:00:00.000000000 Z
11
+ date: 2021-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_backend_commons
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: redis-namespace
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.8'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.8'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: sidekiq
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -77,6 +91,7 @@ files:
77
91
  - README.md
78
92
  - Rakefile
79
93
  - app/workers/demo_worker.rb
94
+ - config/initializers/sidekiq-thecore.rb
80
95
  - config/routes.rb
81
96
  - lib/admin_constraint.rb
82
97
  - lib/tasks/thecore_background_jobs_tasks.rake