lib/openwfe/expressions/time.rb in openwferu-0.9.13 vs lib/openwfe/expressions/time.rb in openwferu-0.9.14
- old
+ new
@@ -28,12 +28,10 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#++
#
-# $Id: definitions.rb 2725 2006-06-02 13:26:32Z jmettraux $
-#
#
# "made in Japan"
#
# John Mettraux at openwfe.org
@@ -74,10 +72,14 @@
@applied_workitem
end
end
+ #
+ # If the expression has been scheduled, a call to this method
+ # will make sure it's unscheduled (removed from the scheduler).
+ #
def unschedule ()
ldebug { "unschedule() @scheduler_job_id is #{@scheduler_job_id}" }
get_scheduler.unschedule(@scheduler_job_id) \
@@ -143,9 +145,10 @@
reschedule(get_scheduler)
end
end
def cancel ()
+
to_unschedule()
super()
end
def trigger (params={})