rufus-scheduler 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +8 -0
- data/CREDITS.txt +2 -0
- data/LICENSE.txt +1 -1
- data/README.md +18 -4
- data/lib/rufus/scheduler.rb +4 -4
- data/lib/rufus/scheduler/cronline.rb +30 -5
- data/lib/rufus/scheduler/job_array.rb +1 -1
- data/lib/rufus/scheduler/jobs.rb +3 -3
- data/lib/rufus/scheduler/locks.rb +1 -1
- data/lib/rufus/scheduler/util.rb +1 -1
- data/lib/rufus/scheduler/zotime.rb +20 -6
- data/t.txt +23 -90
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3058360f44993095ae5952e9c85c85a961059be2
|
4
|
+
data.tar.gz: 7e99f90b386a9353b47bad6ab8f88228a5d46339
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ccd580286d947bdcef2f4d544f3688fd8ed66d6a23ee09adc274cb5f770598bcf39de79aede9ff68c394834091ec0d9ffb2f9845cd9945b821cee5c94a5f857
|
7
|
+
data.tar.gz: 41864b63fdd2a44f2c14861cb25a8ab0523d58593edd16fa049338f413d009193f3d44bb9a14bc91820269fa0ad1bf92b84a210495e4b38bcb56447fe07ba37e
|
data/CHANGELOG.txt
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
= rufus-scheduler CHANGELOG.txt
|
3
3
|
|
4
4
|
|
5
|
+
== rufus-scheduler - 3.3.2 released 2017-01-05
|
6
|
+
|
7
|
+
- Fix ZoTime issue with Time.zone.now #=> 'CST', thanks zzjin
|
8
|
+
- Fix cron weekdays + monthdays, by Dominik Sander, https://github.com/dsander
|
9
|
+
- Speedup CronLine#brute_frequency, by Dominik Sander
|
10
|
+
- Use object_id instead of hash to make Job id
|
11
|
+
|
12
|
+
|
5
13
|
== rufus-scheduler - 3.3.1 released 2016-12-03
|
6
14
|
|
7
15
|
- gh-222 fall back on ENV['TZ'] when Time.now.zone is something
|
data/CREDITS.txt
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
== Contributors
|
6
6
|
|
7
|
+
- Dominik Sander (https://github.com/dsander) - gh-225, gh-226
|
7
8
|
- Piavka (https://github.com/piavka) - Job#trigger_off_schedule, gh-214
|
8
9
|
- Paulo Delgado (https://github.com/paulodelgado) counter ActiveRecord, gh-210
|
9
10
|
- Anjali Sharma (https://github.com/anjali-sharma) enhance job#last_time example
|
@@ -51,6 +52,7 @@
|
|
51
52
|
|
52
53
|
== Feedback
|
53
54
|
|
55
|
+
- zzjin - https://githu.com/zzjin - 3.3.x vs CST abbreviated timezone - gh-228
|
54
56
|
- lovingyu - https://github.com/lovingyu - fallback to ENV['TZ'] - gh-222
|
55
57
|
- Ramon Tayag - https://github.com/ramontayag - prevent day 0 in cronlines
|
56
58
|
- Akinori Musha - https://github.com/knu - ENV['TZ'] setting is harmful
|
data/LICENSE.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
Copyright (c) 2005-
|
2
|
+
Copyright (c) 2005-2017, John Mettraux, jmettraux@gmail.com
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Job scheduler for Ruby (at, cron, in and every jobs).
|
|
8
8
|
|
9
9
|
It uses threads.
|
10
10
|
|
11
|
-
**Note**: maybe are you looking for the [README of rufus-scheduler 2.x](https://github.com/jmettraux/rufus-scheduler/blob/two/README.rdoc)?
|
11
|
+
**Note**: maybe are you looking for the [README of rufus-scheduler 2.x](https://github.com/jmettraux/rufus-scheduler/blob/two/README.rdoc)? (especially if you're using [Dashing](https://github.com/Shopify/dashing) which is [stuck](https://github.com/Shopify/dashing/blob/master/dashing.gemspec) on rufus-scheduler 2.0.24)
|
12
12
|
|
13
13
|
Quickstart:
|
14
14
|
```ruby
|
@@ -67,7 +67,7 @@ A rufus-scheduler instance will go on scheduling while it is present among the o
|
|
67
67
|
## related and similar gems
|
68
68
|
|
69
69
|
* [Whenever](https://github.com/javan/whenever) - let cron call back your Ruby code, trusted and reliable cron drives your schedule
|
70
|
-
* [Clockwork](https://github.com/
|
70
|
+
* [Clockwork](https://github.com/Rykian/clockwork) - rufus-scheduler inspired gem
|
71
71
|
* [Crono](https://github.com/plashchynski/crono) - an in-Rails cron scheduler
|
72
72
|
* [PerfectSched](https://github.com/treasure-data/perfectsched) - highly available distributed cron built on [Sequel](http://sequel.jeremyevans.net) and more
|
73
73
|
|
@@ -91,7 +91,7 @@ I'll drive you right to the [tracks](#so-rails).
|
|
91
91
|
* As said, no more EventMachine-based scheduler
|
92
92
|
* ```scheduler.every('100') {``` will schedule every 100 seconds (previously, it would have been 0.1s). This aligns rufus-scheduler on Ruby's ```sleep(100)```
|
93
93
|
* The scheduler isn't catching the whole of Exception anymore, only StandardError
|
94
|
-
* The error_handler is #on_error (instead of #on_exception), by default it now prints the details of the error to $stderr (used to be $stdout)
|
94
|
+
* The error_handler is [#on_error](#rufusscheduleron_errorjob-error) (instead of #on_exception), by default it now prints the details of the error to $stderr (used to be $stdout)
|
95
95
|
* Rufus::Scheduler::TimeOutError renamed to Rufus::Scheduler::TimeoutError
|
96
96
|
* Introduction of "interval" jobs. Whereas "every" jobs are like "every 10 minutes, do this", interval jobs are like "do that, then wait for 10 minutes, then do that again, and so on"
|
97
97
|
* Introduction of a :lockfile => true/filename mechanism to prevent multiple schedulers from executing
|
@@ -782,7 +782,7 @@ job =
|
|
782
782
|
job.call
|
783
783
|
```
|
784
784
|
|
785
|
-
Warning: the Scheduler#on_error handler is not involved. Error handling is the responsibility of the caller.
|
785
|
+
Warning: the Scheduler[#on_error](#rufusscheduleron_errorjob-error) handler is not involved. Error handling is the responsibility of the caller.
|
786
786
|
|
787
787
|
If the call has to be rescued by the error handler of the scheduler, ```call(true)``` might help:
|
788
788
|
|
@@ -1064,6 +1064,20 @@ def scheduler.on_error(job, error)
|
|
1064
1064
|
end
|
1065
1065
|
```
|
1066
1066
|
|
1067
|
+
On Rails, the `on_error` method redefinition might look like:
|
1068
|
+
```ruby
|
1069
|
+
def scheduler.on_error(job, error)
|
1070
|
+
|
1071
|
+
Rails.logger.error(
|
1072
|
+
"err#{error.object_id} rufus-scheduler intercepted #{error.inspect}" +
|
1073
|
+
" in job #{job.inspect}")
|
1074
|
+
error.backtrace.each_with_index do |line, i|
|
1075
|
+
Rails.logger.error(
|
1076
|
+
"err#{error.object_id} #{i}: #{line}")
|
1077
|
+
end
|
1078
|
+
end
|
1079
|
+
```
|
1080
|
+
|
1067
1081
|
## Rufus::Scheduler #on_pre_trigger and #on_post_trigger callbacks
|
1068
1082
|
|
1069
1083
|
One can bind callbacks before and after jobs trigger:
|
data/lib/rufus/scheduler.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2017, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -39,7 +39,7 @@ module Rufus
|
|
39
39
|
require 'rufus/scheduler/job_array'
|
40
40
|
require 'rufus/scheduler/locks'
|
41
41
|
|
42
|
-
VERSION = '3.3.
|
42
|
+
VERSION = '3.3.2'
|
43
43
|
|
44
44
|
#
|
45
45
|
# A common error class for rufus-scheduler
|
@@ -128,7 +128,7 @@ module Rufus
|
|
128
128
|
#
|
129
129
|
def self.start_new
|
130
130
|
|
131
|
-
fail "this is rufus-scheduler 3.
|
131
|
+
fail "this is rufus-scheduler 3.x, use .new instead of .start_new"
|
132
132
|
end
|
133
133
|
|
134
134
|
def shutdown(opt=nil)
|
@@ -305,7 +305,7 @@ module Rufus
|
|
305
305
|
jobs = jobs.reject { |j| j.next_time.nil? || j.unscheduled_at }
|
306
306
|
end
|
307
307
|
|
308
|
-
tags = Array(opts[:tag] || opts[:tags]).collect
|
308
|
+
tags = Array(opts[:tag] || opts[:tags]).collect(&:to_s)
|
309
309
|
jobs = jobs.reject { |j| tags.find { |t| ! j.tags.include?(t) } }
|
310
310
|
|
311
311
|
jobs
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2017, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -33,6 +33,11 @@ class Rufus::Scheduler
|
|
33
33
|
#
|
34
34
|
class CronLine
|
35
35
|
|
36
|
+
# The max number of years in the future or the past before giving up
|
37
|
+
# searching for #next_time or #previous_time respectively
|
38
|
+
#
|
39
|
+
NEXT_TIME_MAX_YEARS = 14
|
40
|
+
|
36
41
|
# The string used for creating this cronline instance.
|
37
42
|
#
|
38
43
|
attr_reader :original
|
@@ -137,11 +142,17 @@ class Rufus::Scheduler
|
|
137
142
|
|
138
143
|
nt = nil
|
139
144
|
zt = ZoTime.new(from.to_i + 1, @timezone)
|
145
|
+
maxy = from.year + NEXT_TIME_MAX_YEARS
|
140
146
|
|
141
147
|
loop do
|
142
148
|
|
143
149
|
nt = zt.dup
|
144
150
|
|
151
|
+
fail RangeError.new(
|
152
|
+
"failed to reach occurrence within " +
|
153
|
+
"#{NEXT_TIME_MAX_YEARS} years for '#{original}'"
|
154
|
+
) if nt.year > maxy
|
155
|
+
|
145
156
|
unless date_match?(nt)
|
146
157
|
zt.add((24 - nt.hour) * 3600 - nt.min * 60 - nt.sec)
|
147
158
|
next
|
@@ -168,15 +179,21 @@ class Rufus::Scheduler
|
|
168
179
|
# Returns the previous time the cronline matched. It's like next_time, but
|
169
180
|
# for the past.
|
170
181
|
#
|
171
|
-
def previous_time(from=
|
182
|
+
def previous_time(from=ZoTime.now)
|
172
183
|
|
173
184
|
pt = nil
|
174
185
|
zt = ZoTime.new(from.to_i - 1, @timezone)
|
186
|
+
miny = from.year - NEXT_TIME_MAX_YEARS
|
175
187
|
|
176
188
|
loop do
|
177
189
|
|
178
190
|
pt = zt.dup
|
179
191
|
|
192
|
+
fail RangeError.new(
|
193
|
+
"failed to reach occurrence within " +
|
194
|
+
"#{NEXT_TIME_MAX_YEARS} years for '#{original}'"
|
195
|
+
) if pt.year < miny
|
196
|
+
|
180
197
|
unless date_match?(pt)
|
181
198
|
zt.substract(pt.hour * 3600 + pt.min * 60 + pt.sec + 1)
|
182
199
|
next
|
@@ -279,8 +296,10 @@ class Rufus::Scheduler
|
|
279
296
|
#p Time.now - st
|
280
297
|
d = t1 - t0
|
281
298
|
delta = d if d < delta
|
282
|
-
|
283
|
-
break if @months
|
299
|
+
break if @months.nil? && t1.month == 2
|
300
|
+
break if @months.nil? && @days.nil? && t1.day == 2
|
301
|
+
break if @months.nil? && @days.nil? && @hours.nil? && t1.hour == 1
|
302
|
+
break if @months.nil? && @days.nil? && @hours.nil? && @minutes.nil? && t1.min == 1
|
284
303
|
break if t1.year >= 2001
|
285
304
|
|
286
305
|
t0 = t1
|
@@ -488,9 +507,15 @@ class Rufus::Scheduler
|
|
488
507
|
|
489
508
|
return false unless sub_match?(zt, :day, @days)
|
490
509
|
return false unless sub_match?(zt, :month, @months)
|
510
|
+
|
511
|
+
return true if (
|
512
|
+
(@weekdays && @monthdays) &&
|
513
|
+
(sub_match?(zt, :wday, @weekdays) ||
|
514
|
+
sub_match?(zt, :monthdays, @monthdays)))
|
515
|
+
|
491
516
|
return false unless sub_match?(zt, :wday, @weekdays)
|
492
|
-
#return false unless monthday_match?(zt, @monthdays)
|
493
517
|
return false unless sub_match?(zt, :monthdays, @monthdays)
|
518
|
+
|
494
519
|
true
|
495
520
|
end
|
496
521
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2017, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
data/lib/rufus/scheduler/jobs.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2017, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -373,7 +373,7 @@ module Rufus
|
|
373
373
|
self.class.name.split(':').last.downcase[0..-4],
|
374
374
|
@scheduled_at.to_f,
|
375
375
|
@next_time.to_f,
|
376
|
-
self.
|
376
|
+
(self.object_id < 0 ? 'm' : '') + self.object_id.to_s
|
377
377
|
].map(&:to_s).join('_')
|
378
378
|
end
|
379
379
|
|
@@ -503,7 +503,7 @@ module Rufus
|
|
503
503
|
[
|
504
504
|
self.class.name.split(':').last.downcase[0..-4],
|
505
505
|
@scheduled_at.to_f,
|
506
|
-
self.
|
506
|
+
(self.object_id < 0 ? 'm' : '') + self.object_id.to_s
|
507
507
|
].map(&:to_s).join('_')
|
508
508
|
end
|
509
509
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2017, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
data/lib/rufus/scheduler/util.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2017, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2006-
|
2
|
+
# Copyright (c) 2006-2017, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -285,7 +285,7 @@ class Rufus::Scheduler
|
|
285
285
|
# ok, it's a timezone then
|
286
286
|
|
287
287
|
ostr = str
|
288
|
-
str = Time.now.zone if str == :current || str == :local
|
288
|
+
str = ENV['TZ'] || Time.now.zone if str == :current || str == :local
|
289
289
|
|
290
290
|
# utc_offset
|
291
291
|
|
@@ -308,13 +308,27 @@ class Rufus::Scheduler
|
|
308
308
|
|
309
309
|
if str.match(/\A[A-Z0-9-]{3,6}\z/)
|
310
310
|
|
311
|
-
|
312
|
-
|
311
|
+
toff = Time.now.utc_offset
|
312
|
+
toff = nil if str != Time.now.zone
|
313
|
+
|
314
|
+
twin = Time.utc(Time.now.year, 1, 1) # winter
|
315
|
+
tsum = Time.utc(Time.now.year, 7, 1) # summer
|
313
316
|
|
314
317
|
z =
|
315
318
|
::TZInfo::Timezone.all.find do |tz|
|
316
|
-
|
317
|
-
tz.period_for_utc(
|
319
|
+
|
320
|
+
pwin = tz.period_for_utc(twin)
|
321
|
+
psum = tz.period_for_utc(tsum)
|
322
|
+
|
323
|
+
if toff
|
324
|
+
(pwin.abbreviation.to_s == str && pwin.utc_offset == toff) ||
|
325
|
+
(psum.abbreviation.to_s == str && psum.utc_offset == toff)
|
326
|
+
else
|
327
|
+
# returns the first tz with the given abbreviation, almost useless
|
328
|
+
# favour fully named zones...
|
329
|
+
pwin.abbreviation.to_s == str ||
|
330
|
+
psum.abbreviation.to_s == str
|
331
|
+
end
|
318
332
|
end
|
319
333
|
return z if z
|
320
334
|
end
|
data/t.txt
CHANGED
@@ -1,92 +1,25 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
Curved grooves plane – Dabo-jyakuri-ganna (ダボ決り鉋)
|
26
|
-
Lap or halving joint plane – Ai-jyakuri-ganna (相決り鉋)
|
27
|
-
Dovetail plane – Ari-jyakuri-ganna (蟻決り鉋)
|
28
|
-
Groove plane – Kude-jyakuri-ganna (組手決り鉋) // Specially for making Shoji screen dividers joints
|
29
|
-
Wide groove plane – Madowaku-jyakuri-ganna (窓枠決り鉋) // Specially for windows in western architecture
|
30
|
-
Rebate or Rabbet plane – Kiwa-ganna (際鉋)
|
31
|
-
Right cutting type – hidari-gatte (左勝手型)
|
32
|
-
Left cutting type – migi-gatte (右勝手型)
|
33
|
-
Groove sides planes – Wakitori-ganna (脇取鉋)
|
34
|
-
Groove sides plane – Wakitori-ganna (脇取鉋) or Hibukura-ganna (ひぶくら鉋)
|
35
|
-
“Double usages” plane – Nitoku-ganna (二徳鉋)
|
36
|
-
“5 different usages” plane – Gotoku-ganna (五徳鉋)
|
37
|
-
Chamfer planes, Moulding planes and Compass planes – Mentori-ganna (面取り鉋)
|
38
|
-
Convex rounding plane – Sotomaru-ganna (外丸鉋)
|
39
|
-
Concave rounding plane – Uchimaru-ganna (内丸鉋)
|
40
|
-
Spoon-bottomed plane – Soridai-ganna (反り台鉋)
|
41
|
-
4 directionally convex plane – Shiho-sori-ganna (四方反り台鉋)
|
42
|
-
4 directionally concave plane – Funa-zoko-ganna (舟底鉋)
|
43
|
-
Chamfer planes and Moulding planes – Mentori-ganna (面取り鉋)
|
44
|
-
Point of a sword chamfer – Mentori-ganna kensaki (面取鉋-剣先面)
|
45
|
-
Pointed edges chamfer – Mentori-ganna kicho-men (面取鉋-几帳面)
|
46
|
-
Flat chamfer – Mentori-ganna hirakicho-men (面取鉋-平几帳面)
|
47
|
-
Monk’s head chamfer – Mentori-ganna bozu-men (面取鉋-坊主面)
|
48
|
-
Gingko chamfer – Mentori-ganna ginnan-men (面取鉋-銀杏面)
|
49
|
-
Calabash chamfer – Mentori-ganna hyotan-men (面取鉋-瓢箪面)
|
50
|
-
Free form flat chamfer – Mentori-ganna jiyu-kaku-men (面取鉋-自由角面)
|
51
|
-
Free form monk’s head chamfer – Mentori-ganna jiyu-saru-men (面取鉋-角面・猿頬面兼用)
|
52
|
-
UNKNOWN chamfer – Mentori-ganna gomae-men (面取鉋-胡麻柄面)
|
53
|
-
UNKNOWN chamfer – Mentori-ganna hikikake-men (面取鉋-引掛面)
|
54
|
-
UNKNOWN chamfer – Mentori-ganna iriko-men (面取鉋-入子面)
|
55
|
-
Single thread chamfer – Mentori-ganna katahimo-men (面取鉋-片紐面)
|
56
|
-
Double thread chamfer – Mentori-ganna ryohimo-men (面取鉋-両紐面)
|
57
|
-
Mullion chamfer – Mentori-ganna kumiko-men (面取鉋-組子面)
|
58
|
-
Double shape changing chamfer – Mentori-ganna nichobori-henkei-men (面取鉋-二丁掘変形面)
|
59
|
-
Shape changing chamfer – Mentori-ganna henkei-men (面取鉋-変形面)
|
60
|
-
UNKNOWN chamfer – Mentori-ganna sumimaru-yokokezuri (面取鉋-隅丸横削り)
|
61
|
-
UNKNOWN chamfer – Mentori-ganna sumimaru-hyotan-men (面取鉋-隅丸瓢箪面)
|
62
|
-
UNKNOWN chamfer – Mentori-ganna bozu-men (面取鉋-坊主面)
|
63
|
-
UNKNOWN chamfer – Mentori-ganna kenyo-bozu-men (面取鉋-兼用坊主面)
|
64
|
-
UNKNOWN chamfer – Mentori-ganna hira-bozu-men (面取鉋-平坊主面)
|
65
|
-
Kumiko angle planes – Ha-ganna (葉鉋) // Four planes designed to cut at 60°, 45°, 30°, and 15°
|
66
|
-
60° Ha-ganna – Gomagara-ganna (ゴマガラ鉋)
|
67
|
-
45° Ha-ganna – 45 Do-ganna (45度鉋)
|
68
|
-
30° Ha-ganna – Asanoha-ganna (麻ノ葉鉋)
|
69
|
-
15° Ha-ganna – Yae Asa-ganna (八重麻鉋)
|
70
|
-
Special planes
|
71
|
-
Tongue and groove plane – Maru-inrō kanna (丸印籠鉋) // Specially used where Shoji doors meet
|
72
|
-
Tongue and groove plane – Inrō-ganna (印籠鉋) // General Tongue and groove planes
|
73
|
-
Tongue plane – Sane-ganna (さね鉋)
|
74
|
-
Free form tongue plane – jiyu-sane-ganna (自由さね鉋)
|
75
|
-
End grain surface plane – Koguchi-ganna (木口鉋)
|
76
|
-
Round corner rebate or rabbet plane – Naguri-ganna (なぐり鉋)
|
77
|
-
Spokeshave – Nankin-ganna (南京鉋)
|
78
|
-
UNKNOWN groove plane – Umegashi-yo-yokomizu-ganna (埋樫用横溝鉋)
|
79
|
-
Handplane parts and other names
|
80
|
-
Plane blade – Ganna-ba ()
|
81
|
-
Plane block – Ganna-dai or Dai ()
|
82
|
-
White oak for Dai – Kashi ()
|
83
|
-
Common laminated plane blade – Awase-ganna ()
|
84
|
-
Hard steel – Hagane (鋼)
|
85
|
-
Soft iron – Jigane (地金)
|
86
|
-
Front side of blade – Ko ()
|
87
|
-
Back side of blade – Ura (裏)
|
88
|
-
Hollow back of plane blade – Ura-suki (裏透き)
|
89
|
-
The flat of the plane blade – Ito-ura () // Ito is optimal size for planes
|
90
|
-
The mouth – Ha-guchi ()
|
91
|
-
The sole – Shitaba ()
|
2
|
+
**phase 4 - 2016-12-22**
|
3
|
+
|
4
|
+
> Added phase 3 logs to question. It looks like some how there is a new scheduler process that is subsequently created and then destroyed inside the model code. Thanks again for your diligence on this!
|
5
|
+
|
6
|
+
Is that really happening in the model code? Your logs tell us that it happens in another process. Your initial Ruby process initializes rufus-scheduler then your HTTP requests are served in worker processes which are forks of your initial process (without the threads, in other words with inactive schedulers).
|
7
|
+
|
8
|
+
You're using Puma in clustered mode. I should have immediately asked you about your configuration.
|
9
|
+
|
10
|
+
Read carefully its documentation at https://github.com/puma/puma#configuration
|
11
|
+
|
12
|
+
An easy fix would be not to use the clustered mode so that there is only one Ruby process involved, serving all the HTTP requests.
|
13
|
+
|
14
|
+
If you need the clustered mode, you have to change your way of thinking. You probably don't want to have 1 rufus-scheduler instance per worker thread. You could focus on having the core (live) rufus-scheduler in the main process. It could have a "management" job that checks recently updated metrics and unschedules/schedules jobs.
|
15
|
+
|
16
|
+
SCHEDULER.every '10s', overlap: false do
|
17
|
+
Metric.recently_updated.each do |metric|
|
18
|
+
SCHEDULER.jobs(tags: metric.id).each(&:unschedule)
|
19
|
+
SCHEDULER.every(metric.frequency, tags: self.id) { metric.add_value }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
# or something like that...
|
23
|
+
|
24
|
+
Have fun!
|
92
25
|
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rufus-scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.13.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.13.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: chronic
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: job scheduler for Ruby (at, cron, in and every jobs).
|
@@ -59,25 +59,25 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- CHANGELOG.txt
|
63
|
-
- CREDITS.txt
|
64
|
-
- LICENSE.txt
|
65
62
|
- Makefile
|
66
|
-
- README.md
|
67
|
-
- TODO.txt
|
68
|
-
- fail18.txt
|
69
|
-
- lib/rufus-scheduler.rb
|
70
|
-
- lib/rufus/scheduler.rb
|
71
63
|
- lib/rufus/scheduler/cronline.rb
|
72
64
|
- lib/rufus/scheduler/job_array.rb
|
73
65
|
- lib/rufus/scheduler/jobs.rb
|
74
66
|
- lib/rufus/scheduler/locks.rb
|
75
67
|
- lib/rufus/scheduler/util.rb
|
76
68
|
- lib/rufus/scheduler/zotime.rb
|
69
|
+
- lib/rufus/scheduler.rb
|
70
|
+
- lib/rufus-scheduler.rb
|
71
|
+
- rufus-scheduler.gemspec
|
72
|
+
- CHANGELOG.txt
|
73
|
+
- CREDITS.txt
|
74
|
+
- fail18.txt
|
75
|
+
- LICENSE.txt
|
77
76
|
- n.txt
|
78
77
|
- pics.txt
|
79
|
-
- rufus-scheduler.gemspec
|
80
78
|
- t.txt
|
79
|
+
- TODO.txt
|
80
|
+
- README.md
|
81
81
|
homepage: http://github.com/jmettraux/rufus-scheduler
|
82
82
|
licenses:
|
83
83
|
- MIT
|
@@ -88,17 +88,17 @@ require_paths:
|
|
88
88
|
- lib
|
89
89
|
required_ruby_version: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
|
-
- -
|
96
|
+
- - '>='
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
100
|
rubyforge_project: rufus
|
101
|
-
rubygems_version: 2.
|
101
|
+
rubygems_version: 2.0.14
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
104
|
summary: job scheduler for Ruby (at, cron, in and every jobs)
|