Changeset 1772

Show
Ignore:
Timestamp:
08/28/08 11:19:23 (3 months ago)
Author:
kindlund
Message:

Updated email job submission interface to include original message in initial ACK message.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • hive/trunk/data_webapp/app/models/drone_job.rb

    r1703 r1772  
    2121    # Extract the set of URLs 
    2222    urls = obj_hash.delete(:queue_urls) 
     23 
     24    # Extract the original message 
     25    original_message = obj_hash.delete(:original_message) 
    2326     
    2427    # Create a DroneJob 
     
    4346    # If requested, send notification that the DroneJob has been processed. 
    4447    if job.notify_source and job.job_source.response_protocol == 'smtp' 
    45       PostOffice.deliver_job_submitted(job
     48      PostOffice.deliver_job_submitted(job, original_message
    4649    end 
    4750 
  • hive/trunk/data_webapp/app/models/post_office.rb

    r1630 r1772  
    11class PostOffice < ActionMailer::Base 
    2   def job_submitted(job
     2  def job_submitted(job, original_message
    33    return if not job.is_a?(DroneJob) 
    44    @recipients = job.job_source.response_address 
     
    1111    body[:queue_urls] = job.queue_urls 
    1212    body[:job_id] = job.id.nil? ? 0 : job.id 
     13    body[:original_message] = original_message 
    1314    if (body[:job_id] > 0) and (body[:num_urls] > 0)  
    1415      body[:status] = 'Submitted' 
  • hive/trunk/data_webapp/app/views/post_office/job_submitted.text.plain.erb

    r1628 r1772  
    1515BLOCKED::<%= q.url.to_s %> (<%= q.last_visited_at == 0 ? "never" : time_ago(q.last_visited_at) %>) 
    1616<%- end -%> 
     17 
     18-----Original Message----- 
     19<%= @original_message.to_s %>