rufus-scheduler 3.0.5 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.txt CHANGED
@@ -2,6 +2,11 @@
2
2
  = rufus-scheduler CHANGELOG.txt
3
3
 
4
4
 
5
+ == rufus-scheduler - 3.0.6 released 2014/02/14
6
+
7
+ - avoid "can't be called from trap context" on Ruby 2.0, gh-98
8
+
9
+
5
10
  == rufus-scheduler - 3.0.5 released 2014/01/30
6
11
 
7
12
  - implement Job#call(do_rescue=false), gh-97
@@ -38,7 +38,7 @@ module Rufus
38
38
  require 'rufus/scheduler/cronline'
39
39
  require 'rufus/scheduler/job_array'
40
40
 
41
- VERSION = '3.0.5'
41
+ VERSION = '3.0.6'
42
42
 
43
43
  #
44
44
  # A common error class for rufus-scheduler
@@ -124,7 +124,9 @@ module Rufus
124
124
 
125
125
  @started_at = nil
126
126
 
127
- jobs.each { |j| j.unschedule }
127
+ #jobs.each { |j| j.unschedule }
128
+ # provokes https://github.com/jmettraux/rufus-scheduler/issue/98
129
+ @jobs.array.each { |j| j.unschedule }
128
130
 
129
131
  @work_queue.clear
130
132
 
@@ -78,6 +78,13 @@ module Rufus
78
78
 
79
79
  @mutex.synchronize { @array.find { |j| j.job_id == job_id } }
80
80
  end
81
+
82
+ # Only used when shutting down, directly yields the underlying array.
83
+ #
84
+ def array
85
+
86
+ @array
87
+ end
81
88
  end
82
89
  end
83
90
  end
data/out.txt CHANGED
@@ -1,8 +1,12 @@
1
- [:scheduled_at, 2014-01-22 22:21:21 +0900, 1390396881.344438]
2
- [:in, 2014-01-22 22:21:21 +0900, 1390396881.6453865]
3
- [:in, 2014-01-22 22:21:24 +0900, 1390396884.648807]
4
- [:in, 2014-01-22 22:21:27 +0900, 1390396887.651686]
5
- [:in, 2014-01-22 22:21:30 +0900, 1390396890.6571937]
6
- [:in, 2014-01-22 22:21:33 +0900, 1390396893.661189]
7
- [:in, 2014-01-22 22:21:36 +0900, 1390396896.6648037]
8
- [:in, 2014-01-22 22:21:39 +0900, 1390396899.6698604]
1
+ 4408
2
+ :hello
3
+ :hello
4
+ :hello
5
+ /home/jmettraux/w/rufus-scheduler/lib/rufus/scheduler/job_array.rb:74:in `synchronize': can't be called from trap context (ThreadError)
6
+ from /home/jmettraux/w/rufus-scheduler/lib/rufus/scheduler/job_array.rb:74:in `to_a'
7
+ from /home/jmettraux/w/rufus-scheduler/lib/rufus/scheduler.rb:276:in `jobs'
8
+ from /home/jmettraux/w/rufus-scheduler/lib/rufus/scheduler.rb:127:in `shutdown'
9
+ from t.rb:8:in `block in <main>'
10
+ from t.rb:18:in `call'
11
+ from t.rb:18:in `sleep'
12
+ from t.rb:18:in `<main>'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufus-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-29 00:00:00.000000000 Z
12
+ date: 2014-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tzinfo
@@ -104,7 +104,7 @@ files:
104
104
  homepage: http://github.com/jmettraux/rufus-scheduler
105
105
  licenses:
106
106
  - MIT
107
- post_install_message: ! "\n***\n\nThanks for installing rufus-scheduler 3.0.5\n\nIt
107
+ post_install_message: ! "\n***\n\nThanks for installing rufus-scheduler 3.0.6\n\nIt
108
108
  might not be 100% compatible with rufus-scheduler 2.x.\n\nIf you encounter issues
109
109
  with this new rufus-scheduler, especially\nif your app worked fine with previous
110
110
  versions of it, you can\n\nA) Forget it and peg your Gemfile to rufus-scheduler