Skip to content

Commit

Permalink
Renamed set_last_run to last_enqueued_at
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Shub committed Feb 20, 2014
1 parent 5375c9c commit c907a86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/resque/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def load_schedule_job(name, config)
@@scheduled_jobs[name] = rufus_scheduler.send(interval_type, *args) do
if is_master?
log! "queueing #{config['class']} (#{name})"
Resque.set_last_run name, DateTime.now.to_s
Resque.last_enqueued_at name, DateTime.now.to_s
handle_errors { enqueue_from_config(config) }
end
end
Expand Down
8 changes: 4 additions & 4 deletions lib/resque_scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,12 @@ def scheduled_at(klass, *args)
end
end

def set_last_run(job_name, date)
redis.hset('delayed:last_run', job_name, date)
def last_enqueued_at(job_name, date)
redis.hset('delayed:last_enqueued_at', job_name, date)
end

def get_last_run(job_name)
redis.hget('delayed:last_run', job_name)
def get_last_enqueued_at(job_name)
redis.hget('delayed:last_enqueued_at', job_name)
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/resque_scheduler/server/views/scheduler.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<td ><%= h schedule_class(config) %></td>
<td><%= h config['queue'] || queue_from_class_name(config['class']) %></td>
<td><%= h config['args'].inspect %></td>
<td><%= h Resque.get_last_run(name) || 'Never' %></td>
<td><%= h Resque.get_last_enqueued_at(name) || 'Never' %></td>
</tr>
<% end %>
</table>
Expand Down

0 comments on commit c907a86

Please sign in to comment.