scheduled_job 0.1.2 → 0.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
  SHA1:
3
- metadata.gz: 712f66200583b9e067a22f431affda4671d851fe
4
- data.tar.gz: e1cd08470ad32b62426ef84fbbe7beacff5d67e6
3
+ metadata.gz: 3f4aeb844936fa93b9a77c995f7ef60f6a608363
4
+ data.tar.gz: 8cfae161115457229fc55f4a3d8cfc75ba1b57a9
5
5
  SHA512:
6
- metadata.gz: 2fde7757c4786f6e662025793b4c8898b6d8662ae34ebb93dd309fdac1c19443bb7a0d240938406e1656db9ec7a2420f0ddf601569f29fc1327b0a77cdf00cae
7
- data.tar.gz: d3ee92b75600556d67947287ae7c6885276675d5a8a3dbb708cf407b50a7afb19965e8bcf346ea5dc67fa65bc0ded48626052a2634ca88bca896eb7953899f32
6
+ metadata.gz: aa5e0709f3de874f891fa8dce578a8033209585c7debc2783142ad2482bd0d33242ffe5d9d33d27e8f8b14bd2e4df5221be9c1b010aaba999f01f6744c9e2f97
7
+ data.tar.gz: 66ed3774b6c77d01972d96a5d5e13021b97a9aec7309fb8b0d3bee6c4a63031f394ac2ba86f3224da72407d8ed7f8437bbb7f522b938943db52e621166400218
data/CHANGELOG.md CHANGED
@@ -28,3 +28,7 @@ Allows jobs in config to be strings, symbols, or classes. If a string or symbol
28
28
 
29
29
  # 0.1.2
30
30
  Falls back to the Delayed Job default queue name if none is provided. Ensures that the run at is set using UTC timezone. Updates specs to run on the latest ruby version on CI.
31
+
32
+ # 0.1.3
33
+ Gracefully handle the case when the delayed_job table doesn't exist but `rake jobs:reschedule` is called.
34
+ This is needed is some cases where scheduled_job is deployed in a container and the container needs to start so the table can be created.
@@ -1,3 +1,3 @@
1
1
  module ScheduledJob
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/tasks/jobs.rb CHANGED
@@ -8,7 +8,11 @@ module ScheduledJob
8
8
  namespace:jobs do
9
9
  desc "Will schedule all scheduled jobs"
10
10
  task :reschedule => :environment do
11
- ScheduledJob.reschedule
11
+ if ActiveRecord::Base.connection.table_exists?('delayed_jobs')
12
+ ScheduledJob.reschedule
13
+ else
14
+ puts "Skipping this rake task as the delayed_jobs table doesn't exist yet."
15
+ end
12
16
  end
13
17
  end
14
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scheduled_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - CallumD
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-06-22 00:00:00.000000000 Z
14
+ date: 2015-07-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: delayed_job