arask 1.2.0 → 1.2.1

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
  SHA1:
3
- metadata.gz: e2055444d486251702ec8f09cc6944742f4ef45e
4
- data.tar.gz: 3215c191aab13ce67fec68d09ec02962314f528b
3
+ metadata.gz: 4c4b7fd220de0e43d8ca14137d81f5baa2ccdc26
4
+ data.tar.gz: e21c65798d3b03023907cf5ad474be21b3df6c95
5
5
  SHA512:
6
- metadata.gz: ba226a137d88675b7375f5bc59cdd780437a5f9bd218c7523ec8ad149823d03511b96a358acb3ca8b2d2a26d9b36a3577bb134925b03ee0f9a8c75721cf53cc0
7
- data.tar.gz: af1ab2f4a7933407c0361e4f14fc09a8c00f974db29859a3532fabe374a25f28db8cfca5fc7c252af539f17f28f632c51b77ea3c1cd5bc4709aa88eae6fce408
6
+ metadata.gz: '08437f2ea24b74ddef65763610cf7ee73a4fc6784386155564b54264b0ee3d81cc0bb18506395cde48ff26e50dedc034c858e99d4c8ad21b1b9b5a30421839a6'
7
+ data.tar.gz: 36f6ec33b10d3881e0bba6459ab5e5eea449a80f865eec2325fb39ac870637774529e205b1c8e0e49b5e57dfc22e7856a672317ea322a4a86d9135c074f81402
data/README.md CHANGED
@@ -52,7 +52,7 @@ arask.on_exception email: 'errors@example.com'
52
52
 
53
53
  # Run code on exceptions
54
54
  arask.on_exception do |exception, arask_job|
55
- Honeybadger.notify(exception)
55
+ MyExceptionHandler.new(exception)
56
56
  end
57
57
  ```
58
58
 
@@ -7,9 +7,9 @@ require 'fugit' # To parse cron
7
7
  module Arask
8
8
  class << self; attr_accessor :jobs_touched, :exception_email, :exception_email_from, :exception_block; end
9
9
 
10
- def self.setup
10
+ def self.setup(force_run = false)
11
11
  # Make sure we only run setup if Rails is actually run as a server or testing.
12
- return unless defined?(Rails::Server) or Rails.env.test?
12
+ return unless defined?(Rails::Server) or force_run
13
13
  # If we don't wait and rails is setup to use another language, ActiveJob
14
14
  # saves what is now (usually :en) and reloads that when trying to run the
15
15
  # job. Renderering an I18n error of unsupported language.
@@ -27,7 +27,7 @@ module Arask
27
27
  def self.queue_self
28
28
  begin
29
29
  next_job_run = AraskJob.order(execute_at: :asc).first.try(:execute_at)
30
- # At least check database for jobs every 5 minutes
30
+ # At least check database for jobs every day
31
31
  next_job_run = 1.day.from_now if next_job_run.nil? or (next_job_run - DateTime.now)/60/60 > 24
32
32
  RunJobs.set(wait_until: next_job_run).perform_later
33
33
  rescue
@@ -24,6 +24,6 @@ Arask.setup do |arask|
24
24
 
25
25
  # Run code on exceptions
26
26
  #arask.on_exception do |exception, arask_job|
27
- # Honeybadger.notify(exception)
27
+ # MyExceptionHandler.new(exception)
28
28
  #end
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module Arask
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arask
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esben Damgaard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-03 00:00:00.000000000 Z
11
+ date: 2018-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails