lib/rufus/scheduler/jobs.rb in rufus-scheduler-3.3.1 vs lib/rufus/scheduler/jobs.rb in rufus-scheduler-3.3.2
- old
+ new
@@ -1,7 +1,7 @@
#--
-# Copyright (c) 2006-2016, John Mettraux, jmettraux@gmail.com
+# Copyright (c) 2006-2017, John Mettraux, jmettraux@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -371,11 +371,11 @@
[
self.class.name.split(':').last.downcase[0..-4],
@scheduled_at.to_f,
@next_time.to_f,
- self.hash.abs
+ (self.object_id < 0 ? 'm' : '') + self.object_id.to_s
].map(&:to_s).join('_')
end
# There is no next_time for one time jobs, hence the false.
#
@@ -501,10 +501,10 @@
def determine_id
[
self.class.name.split(':').last.downcase[0..-4],
@scheduled_at.to_f,
- self.hash.abs
+ (self.object_id < 0 ? 'm' : '') + self.object_id.to_s
].map(&:to_s).join('_')
end
def occurrences(time0, time1)