myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2365] branches/biocat/app/controllers/workflows_


From: noreply
Subject: [myexperiment-hackers] [2365] branches/biocat/app/controllers/workflows_controller.rb: uploading workflows and versions now extracts the workflow metadata
Date: Wed, 31 Mar 2010 05:49:42 -0400 (EDT)

Revision
2365
Author
dgc
Date
2010-03-31 05:49:41 -0400 (Wed, 31 Mar 2010)

Log Message

uploading workflows and versions now extracts the workflow metadata

Modified Paths

Diff

Modified: branches/biocat/app/controllers/workflows_controller.rb (2364 => 2365)


--- branches/biocat/app/controllers/workflows_controller.rb	2010-03-31 09:32:55 UTC (rev 2364)
+++ branches/biocat/app/controllers/workflows_controller.rb	2010-03-31 09:49:41 UTC (rev 2365)
@@ -307,6 +307,11 @@
           @workflow.solr_save if Conf.solr_enable
         end
         
+        begin
+          @workflow.extract_metadata
+        rescue
+        end
+
         policy_err_msg = update_policy(@workflow, params)
     
         # Credits and Attributions:
@@ -410,6 +415,16 @@
       # TODO: wrap this in a transaction!
       @workflow.content_blob_id = ContentBlob.create(:data ="" file.read).id
       if @workflow.save_as_new_version(params[:new_workflow][:rev_comments])
+
+        # Extract workflow metadata using a Workflow object that includes the
+        # newly created version.
+
+        begin
+          @workflow.reload
+          @workflow.extract_metadata
+        rescue
+        end
+
         respond_to do |format|
           flash[:notice] = 'New workflow version successfully created.'
           format.html { redirect_to workflow_url(@workflow) }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]