4 include CommonApiTemplate
5 serialize :command_parameters, Hash
6 before_create :ensure_unique_submit_id
8 class SubmitIdReused < StandardError
11 api_accessible :superuser, :extend => :common do |t|
15 t.add :command_parameters
16 t.add :command_version
18 t.add :cancelled_by_client
19 t.add :cancelled_by_user
28 def ensure_unique_submit_id
30 if Job.where('submit_id=?',self.submit_id).first
31 raise SubmitIdReused.new