Skip to content

Commit

Permalink
Remove unused pause message state
Browse files Browse the repository at this point in the history
  • Loading branch information
sodabrew committed Jan 23, 2015
1 parent fada4f6 commit 1c07c59
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions code/queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def self.create(options, config_path=nil)
FileUtils.mkdir_p(queue_path + '/prep')
FileUtils.mkdir_p(queue_path + '/que')
FileUtils.mkdir_p(queue_path + '/run')
FileUtils.mkdir_p(queue_path + '/pause')
RQ::HashDir.make(queue_path + '/done')
RQ::HashDir.make(queue_path + '/relayed')
FileUtils.mkdir_p(queue_path + '/err')
Expand Down Expand Up @@ -713,8 +712,6 @@ def msg_state(msg, options={:consistency => true})
'relayed'
elsif not Dir.glob(File.join(@queue_path, 'err', msg_id)).empty?
'err'
elsif not Dir.glob("#{@queue_path}/pause/#{msg_id}").empty?
'pause'
end

return false unless state
Expand Down Expand Up @@ -754,7 +751,6 @@ def delete_msg!(msg)
end
# TODO
# run
# pause
# done
end

Expand Down Expand Up @@ -1061,8 +1057,6 @@ def handle_status_read(msg)
## THE QUESTIONS: Do we kill the job now?
# No - up to script writer. They should exit
# we'll trust them for now
when 'pause'
@completed << [msg, :pause, Time.now.to_i]
when 'relayed'
@completed << [msg, :relayed, Time.now.to_i]
when 'resend'
Expand Down Expand Up @@ -1590,7 +1584,6 @@ def handle_request(sock)
status['prep'] = @prep.length
status['que'] = @que.length
status['run'] = @run.length
status['pause'] = []
status['done'] = RQ::HashDir.num_entries(@queue_path + "/done")
status['relayed'] = RQ::HashDir.num_entries(@queue_path + "/relayed/")
status['err'] = Dir.entries(@queue_path + "/err/").reject { |i| i.start_with?('.') }.length
Expand Down

0 comments on commit 1c07c59

Please sign in to comment.