[ARVADOS] created: ccb95499d6eb46957cda2f060d0b931df2dd82d4

Git user git at public.curoverse.com
Thu Jan 12 15:39:59 EST 2017


        at  ccb95499d6eb46957cda2f060d0b931df2dd82d4 (commit)


commit ccb95499d6eb46957cda2f060d0b931df2dd82d4
Author: radhika <radhika at curoverse.com>
Date:   Wed Jan 4 07:03:31 2017 -0500

    10516: set finished_at to updated_at on pipeline_instances if the pipeline is finished but the finished_at is not set.

diff --git a/services/api/db/migrate/20170105160302_set_finished_at_on_finished_pipeline_instances.rb b/services/api/db/migrate/20170105160302_set_finished_at_on_finished_pipeline_instances.rb
new file mode 100644
index 0000000..758b86f
--- /dev/null
+++ b/services/api/db/migrate/20170105160302_set_finished_at_on_finished_pipeline_instances.rb
@@ -0,0 +1,5 @@
+class SetFinishedAtOnFinishedPipelineInstances < ActiveRecord::Migration
+  def change
+    ActiveRecord::Base.connection.execute("update pipeline_instances set finished_at=updated_at where finished_at is null and (state='Failed' or state='Complete')")
+  end
+end
diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index ea406f2..9ff935e 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -2738,4 +2738,6 @@ INSERT INTO schema_migrations (version) VALUES ('20161223090712');
 
 INSERT INTO schema_migrations (version) VALUES ('20170102153111');
 
-INSERT INTO schema_migrations (version) VALUES ('20170105160301');
\ No newline at end of file
+INSERT INTO schema_migrations (version) VALUES ('20170105160301');
+
+INSERT INTO schema_migrations (version) VALUES ('20170105160302');
\ No newline at end of file

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list