Sha256: 4d1863aa284947c86cda7d5d95c0df20507be756add2bf97f5b1e3668b6e62a3

Contents?: true

Size: 371 Bytes

Versions: 51

Compression:

Stored size: 371 Bytes

Contents

module EasyML
  class SyncDatasourceJob < ApplicationJob
    queue_as :easy_ml

    def perform(id)
      datasource = EasyML::Datasource.find(id)
      create_event(datasource, "started")

      begin
        datasource.refresh
      rescue StandardError => e
        datasource.update!(is_syncing: false)
        handle_error(datasource, e)
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
easy_ml-0.2.0.pre.rc52 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc51 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc50 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc49 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc48 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc47 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc46 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc45 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc44 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc43 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc41 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc40 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc39 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc38 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc37 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc36 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc35 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc34 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc33 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc32 app/jobs/easy_ml/sync_datasource_job.rb