X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fec7796668a4f4a73bb52e16e13e4504f76649f5..e4c83a3ebe3b16c16f604b3b0968ce5600b7ab64:/services/api/app/models/job.rb diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb index 30a0294a34..37e5f455df 100644 --- a/services/api/app/models/job.rb +++ b/services/api/app/models/job.rb @@ -7,7 +7,7 @@ # # This is superceded by containers / container_requests (aka crunch v2) # -# Arvados installations since the beginning of 2018 should have never +# Arvados installations since the end of 2017 should have never # used jobs, and are unaffected by this change. # # So that older Arvados sites don't lose access to legacy records, the @@ -47,6 +47,8 @@ class Job < ArvadosModel validate :ensure_no_collection_uuids_in_script_params before_save :tag_version_in_internal_repository before_save :update_timestamps_when_state_changes + before_create :create_disabled + before_update :update_disabled has_many(:nodes, foreign_key: :job_uuid, primary_key: :uuid) @@ -551,4 +553,12 @@ class Job < ArvadosModel end false end + + def create_disabled + raise "Disabled" + end + + def update_disabled + raise "Disabled" + end end