thecore_background_jobs 2.0.7 → 2.1.0

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: b8223984fa468daa5afe70adf72fd26c480c324cb7542ac414225c38a44aa4a1
4
- data.tar.gz: dcb1b3cb3caebc506eede7509ab358119d9948db8e429d0bce603050d61f0237
3
+ metadata.gz: 79100472262d757000844d14246c1d1ea161443abbc4079c3e7b109235ddfdeb
4
+ data.tar.gz: fd4bcbe11df64eacec37ba6d6a980ee8f07eee2c17f686f4213ddab085e11625
5
5
  SHA512:
6
- metadata.gz: ba3d17f611c2c59d9a03b849f03bf09cec6a80457241789cb57b8b6b36aa0afd40dc87523584f697275b5faa602bbb8ee28cdee99bb022c487b68bb4f5923108
7
- data.tar.gz: 7d9b634bfafad673489d5cb2a3653d7c5a58d1a2f75e13fc3d3b069ea646f42d69fd21bf739f34947ce05060ac3fb38dbd40b20dd052a4b361b76b1c9ede6eb2
6
+ metadata.gz: 668d2e1427fc4dfef65a7bfee5c62c81678d953db32d009cbf4390d2e80f379f437c4cc420053580e697b8e37d2257d83e7d28e689863ae40c23add96311a07a
7
+ data.tar.gz: '02482fb14a3676605043b178a0f2b66918997145abcb328d3b420160af136a2fe9c0001b4daaacb7ee00c8f1792b8e7e385e47c3330b8ff122e7aa94f552ce5b'
@@ -1,5 +1,6 @@
1
1
  class DemoWorker
2
2
  include Sidekiq::Worker
3
+ sidekiq_options retry: false, queue: "#{ENV["COMPOSE_PROJECT_NAME"]}_default"
3
4
 
4
5
  def perform(*args)
5
6
  puts "Worker is working"
data/config/routes.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  Rails.application.routes.draw do
2
2
  require 'sidekiq/web'
3
- # Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]
4
- authenticate do
5
- mount Sidekiq::Web, at: "/app/sidekiq"
3
+ require 'sidekiq-scheduler/web'
4
+
5
+ # Allow any authenticated User with admin capability
6
+ authenticate :user, lambda { |u| u.admin? } do
7
+ mount Sidekiq::Web => '/sidekiq'
6
8
  end
7
- # mount Sidekiq::Web => '/sidekiq', :constraints => AdminConstraint.new
8
9
  end
@@ -6,4 +6,12 @@ require "thecore_background_jobs/engine"
6
6
 
7
7
  module ThecoreBackgroundJobs
8
8
  # Your code goes here...
9
+ def self.email_setup
10
+ 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")}
11
+ # Other Options
12
+ delivery_options.merge!({user_name: Settings.ns(:smtp).user_name}) unless Settings.ns(:smtp).user_name.blank?
13
+ delivery_options.merge!({password: Settings.ns(:smtp).password}) unless Settings.ns(:smtp).password.blank?
14
+ delivery_options.merge!({authentication: Settings.ns(:smtp).authentication}) unless Settings.ns(:smtp).authentication.blank?
15
+ delivery_options
16
+ end
9
17
  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.7
4
+ version: 2.1.0
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-03-16 00:00:00.000000000 Z
11
+ date: 2021-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_backend_commons
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.0.3
105
+ rubygems_version: 3.0.3.1
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Thecorized thecore_background_jobs