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.rc31 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc30 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc29 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc28 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc27 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc26 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc25 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc24 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc23 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc22 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc21 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc20 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc19 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc18 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc17 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc16 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc15 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc14 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc13 app/jobs/easy_ml/sync_datasource_job.rb
easy_ml-0.2.0.pre.rc12 app/jobs/easy_ml/sync_datasource_job.rb