Skip to content

Commit ce28439

Browse files
iloveitalyjeremy
authored andcommitted
Document heartbeat_internal, prune_interval, and enqueue_front
Closes resque#1620
1 parent b0f6fd2 commit ce28439

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/resque.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ def redis_id
153153
DEFAULT_HEARTBEAT_INTERVAL = 60
154154
DEFAULT_PRUNE_INTERVAL = DEFAULT_HEARTBEAT_INTERVAL * 5
155155

156+
# Defines how often a Resque worker updates the heartbeat key. Must be less
157+
# than the prune interval.
156158
attr_writer :heartbeat_interval
157159
def heartbeat_interval
158160
if defined? @heartbeat_interval
@@ -162,6 +164,7 @@ def heartbeat_interval
162164
end
163165
end
164166

167+
# Defines how often Resque checks for dead workers.
165168
attr_writer :prune_interval
166169
def prune_interval
167170
if defined? @prune_interval
@@ -171,6 +174,10 @@ def prune_interval
171174
end
172175
end
173176

177+
# By default, jobs are pushed to the back of the queue and popped from
178+
# the front, resulting in "first in, first out" (FIFO) execution order.
179+
# Set to true to push jobs to the front of the queue instead, resulting
180+
# in "last in, first out" (LIFO) execution order.
174181
attr_writer :enqueue_front
175182
def enqueue_front
176183
if defined? @enqueue_front

0 commit comments

Comments
 (0)