<% form_for(:job, :html => {:class => "job"}) do |f| %> <%= f.label :worker_class %>
<%= f.text_field :worker_class, :class => "worker-class" %>
<%= f.label :worker_method %>
<%= f.text_field :worker_method, :class => "worker-method" %>
<%= f.label :args, "Args - each line (including empty) is interpreted as a string argument" %>
<%= f.text_area :args %>
<%= f.submit "Enqueue", :class => "button" %>
<% end %>

<% @jobs.each do |job| %> <%= render :partial => "job", :locals => {:job => job} %> <%= periodically_call_remote( :url => admin_job_path(job), :method => "get", :interval => 5, :condition => "/^(running|pending|stopping)$/.match(job_state_#{dom_id(job)})") %> <% end %>