canvas_sync 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d67da42a99163681e0b38c654370ebe31e8fcb76
4
- data.tar.gz: 7ec74a8b1bbbac7878db5b4c81a1d0944acb7c74
3
+ metadata.gz: fbbd1539f4a800bb595198f919653e5b73454b7b
4
+ data.tar.gz: 75508d1a64e10df9cd21b413ccfda805be8abdbd
5
5
  SHA512:
6
- metadata.gz: e78e38fcc9e151c21d0b562a12cdae647b474aaf13eaa980be2dcbcafa4e45b2a37943d0d2ed4b893fe839927cc61a167d60dbdb3b4af0ed6f49be22f7abdea9
7
- data.tar.gz: 2e1bb5e9523491efd415f947340fc9bbf37b49f07c5d2afcb27f9ec5a9da639f47dff83ef372bdfd546fb842f4fca48b0b7f3928ba776dd51b15ad4c1f15f60e
6
+ metadata.gz: 0b346284748712d882fba0f6ce149d8750967c832b58bf3c9446b51e6f0b02ab2d3346d54d9e3c0fc653785517faa93d35a5123146797c35d6db0242a8db4d6a
7
+ data.tar.gz: fa0fe09275931b1af5f08940515300543fcbbdf7557f0c650f294efc5512ff503f5f7da6eba1bb23a4e28853b69df651b50fb2d5ced403b837e15481a825a49c
data/README.md CHANGED
@@ -18,6 +18,12 @@ bin/rails generate canvas_sync:install --models users,terms,courses
18
18
 
19
19
  Use the `--models` option to specify what models you would like installed. This will add both the model files and their corresponding migrations. If you'd like to install all the models that `CanvasSync` supports then specify `--models all`.
20
20
 
21
+ Then run the migrations:
22
+
23
+ ```
24
+ bundle exec rake db:migrate
25
+ ```
26
+
21
27
  For a list of currently supported models, see `CanvasSync::SUPPORTED_MODELS`.
22
28
 
23
29
  Additionally, your Canvas instance must have the "Proserv Provisioning Report" enabled.
@@ -63,6 +69,17 @@ If you pass in the optional `term_scope` the provisioning reports will be run fo
63
69
 
64
70
  Imports are inserted in bulk with [https://github.com/zdennis/activerecord-import](activerecord-import) so they should be very fast.
65
71
 
72
+ ## CanvasSync::JobLog
73
+
74
+ Running the migrations will create a `canvas_sync_job_logs` table. All the jobs written in this gem will create a `CanvasSync::JobLog` and store data about their arguments, job class, any exceptions, and start/completion time. This will work regardless of your queue adapter.
75
+
76
+ If you want your own jobs to also log to the table all you have to do is have your job class inherit from `CanvasSync::Job`. You can also persist extra data you might need later by saving to the `metadata` column:
77
+
78
+ ```
79
+ @job_log.metadata = "This job ran really well!"
80
+ @job_log.save!
81
+ ```
82
+
66
83
  ## Advanced Usage
67
84
 
68
85
  This gem also helps with syncing and processing other reports if needed. In order to do so, you must:
@@ -137,7 +154,7 @@ What if you've got some other job that you want run that doesn't deal with a rep
137
154
 
138
155
 
139
156
  ```
140
- class SomeRandomJob < CanvasSync::Jobs::ApplicationJob
157
+ class SomeRandomJob < CanvasSync::Job
141
158
  def perform(job_chain, options)
142
159
  i_dunno_do_something!
143
160
 
@@ -0,0 +1,8 @@
1
+ module CanvasSync
2
+ # When you write a job that inherits from CanvasSync::Job it will log to the canvas_sync_job_logs table
3
+ #
4
+ # Use this model to track failures, job run times, and metadata about a job.
5
+ class JobLog < ApplicationRecord
6
+ serialize :job_arguments, Array
7
+ end
8
+ end
@@ -0,0 +1,16 @@
1
+ class CreateCanvasSyncJobLog < ActiveRecord::Migration[5.1]
2
+ def change
3
+ create_table :canvas_sync_job_logs do |t|
4
+ t.datetime :started_at
5
+ t.datetime :completed_at
6
+ t.string :exception
7
+ t.text :backtrace
8
+ t.string :job_class
9
+ t.string :status
10
+ t.text :metadata
11
+ t.text :job_arguments
12
+
13
+ t.timestamps
14
+ end
15
+ end
16
+ end
@@ -1,7 +1,8 @@
1
1
  require "bearcat"
2
2
  require "canvas_sync/version"
3
+ require "canvas_sync/engine"
3
4
 
4
- require "canvas_sync/jobs/application_job"
5
+ require "canvas_sync/job"
5
6
  require "canvas_sync/jobs/report_starter"
6
7
  require "canvas_sync/jobs/report_checker"
7
8
  require "canvas_sync/jobs/report_processor_job"
@@ -0,0 +1,13 @@
1
+ require 'rails'
2
+
3
+ module CanvasSync
4
+ class Engine < ::Rails::Engine
5
+ isolate_namespace CanvasSync
6
+
7
+ initializer :append_migrations do |app|
8
+ config.paths["db/migrate"].expanded.each do |expanded_path|
9
+ app.config.paths["db/migrate"] << expanded_path
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,29 @@
1
+ require "active_job"
2
+
3
+ module CanvasSync
4
+ # Inherit from this class to build a Job that will log to the canvas_sync_job_logs table
5
+ class Job < ActiveJob::Base
6
+ around_perform do |job, block|
7
+ @job_log = CanvasSync::JobLog.create(
8
+ started_at: Time.now,
9
+ job_class: self.class.name,
10
+ job_arguments: job.arguments
11
+ )
12
+
13
+ begin
14
+ block.call
15
+ rescue => e
16
+ @job_log.exception = "#{e.class}: #{e.message}"
17
+ @job_log.backtrace = e.backtrace
18
+ raise e
19
+ ensure
20
+ @job_log.completed_at = Time.now
21
+ @job_log.save!
22
+ end
23
+ end
24
+
25
+ def report_checker_wait_time
26
+ Rails.env.development? ? 1.second : 30.seconds
27
+ end
28
+ end
29
+ end
@@ -3,7 +3,7 @@ module CanvasSync
3
3
  # ActiveJob class used to check the status of a pending Canvas report.
4
4
  # Re-enqueues itself if the report is still processing on Canvas.
5
5
  # Enqueues the ReportProcessor when the report has completed.
6
- class ReportChecker < ApplicationJob
6
+ class ReportChecker < CanvasSync::Job
7
7
  # @param job_chain [Hash]
8
8
  # @param report_name [Hash] e.g., 'provisioning_csv'
9
9
  # @param report_id [Integer]
@@ -5,7 +5,7 @@ module CanvasSync
5
5
  # ActiveJob class that wraps around a report processor. This job will
6
6
  # download the report, and then pass the file path and options into the
7
7
  # process method on the processor.
8
- class ReportProcessorJob < ApplicationJob
8
+ class ReportProcessorJob < CanvasSync::Job
9
9
  # @param job_chain [Hash]
10
10
  # @param report_name [Hash] e.g., 'provisioning_csv'
11
11
  # @param report_url [String]
@@ -1,7 +1,7 @@
1
1
  module CanvasSync
2
2
  module Jobs
3
3
  # Starts a Canvas report and enqueues a ReportChecker
4
- class ReportStarter < ApplicationJob
4
+ class ReportStarter < CanvasSync::Job
5
5
  # @param job_chain [Hash]
6
6
  # @param report_name [Hash] e.g., 'provisioning_csv'
7
7
  # @param report_params [Hash] The Canvas report parameters
@@ -1,7 +1,7 @@
1
1
  module CanvasSync
2
2
  module Jobs
3
3
  # ActiveJob class that starts a Canvas provisioning report
4
- class SyncProvisioningReportJob < ApplicationJob
4
+ class SyncProvisioningReportJob < CanvasSync::Job
5
5
  # @param job_chain [Hash]
6
6
  # @param options [Hash] If options contains a :term_scope a seperate provisioning report
7
7
  # will be started for each term in that scope. :models should be an array of
@@ -1,6 +1,6 @@
1
1
  module CanvasSync
2
2
  module Jobs
3
- class SyncTermsJob < ApplicationJob
3
+ class SyncTermsJob < CanvasSync::Job
4
4
  # Syncs Terms using the Canvas API
5
5
  #
6
6
  # Terms are pre-synced so that provisioning reports can be scoped to term.
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -0,0 +1,40 @@
1
+ require 'spec_helper'
2
+
3
+ class GoodJob < CanvasSync::Job
4
+ def perform(argument)
5
+ end
6
+ end
7
+
8
+ class EvilError < StandardError; end;
9
+
10
+ class BadJob < CanvasSync::Job
11
+ def perform(argument)
12
+ raise EvilError
13
+ end
14
+ end
15
+
16
+ RSpec.describe CanvasSync::Job do
17
+ describe '#perform' do
18
+ it 'creates a CanvasSync::JobLog and logs relevant data on it' do
19
+ expect {
20
+ GoodJob.perform_now("argument")
21
+ }.to change { CanvasSync::JobLog.count }.by(1)
22
+
23
+ job_log = CanvasSync::JobLog.last
24
+ expect(job_log.started_at).to_not be_nil
25
+ expect(job_log.job_class).to eq(GoodJob.to_s)
26
+ expect(job_log.job_arguments).to eq(["argument"])
27
+ expect(job_log.completed_at).to_not be_nil
28
+ end
29
+
30
+ it 'logs exceptions on the CanvasSync::JobLog and then re-raises' do
31
+ expect {
32
+ BadJob.perform_now("argument")
33
+ }.to raise_exception(StandardError)
34
+
35
+ job_log = CanvasSync::JobLog.last
36
+ expect(job_log.exception).to eq("EvilError: EvilError")
37
+ expect(job_log.backtrace).to_not be_nil
38
+ end
39
+ end
40
+ end
@@ -10,7 +10,19 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 20170914181345) do
13
+ ActiveRecord::Schema.define(version: 20170915210836) do
14
+
15
+ create_table "canvas_sync_job_logs", force: :cascade do |t|
16
+ t.datetime "started_at"
17
+ t.datetime "completed_at"
18
+ t.string "exception"
19
+ t.text "backtrace"
20
+ t.string "job_class"
21
+ t.text "metadata"
22
+ t.text "job_arguments"
23
+ t.datetime "created_at", null: false
24
+ t.datetime "updated_at", null: false
25
+ end
14
26
 
15
27
  create_table "courses", force: :cascade do |t|
16
28
  t.bigint "canvas_course_id", null: false
Binary file
@@ -3499,4 +3499,744 @@ Migrating to CreateCourses (20170914181345)
3499
3499
  SELECT sql
3500
3500
  FROM sqlite_temp_master
3501
3501
  WHERE name='index_users_on_canvas_user_id' AND type='index'
3502
+ 
3503
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3504
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3505
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3506
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3507
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3508
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3509
+  (0.1ms) SELECT sqlite_version(*)
3510
+  (2.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3511
+  (0.8ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3512
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3513
+ Migrating to CreateUsers (20170831221129)
3514
+  (0.1ms) begin transaction
3515
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3516
+  (0.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3517
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170831221129"]]
3518
+  (0.9ms) commit transaction
3519
+ Migrating to CreateEnrollments (20170905192509)
3520
+  (0.0ms) begin transaction
3521
+  (0.4ms) CREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3522
+  (0.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3523
+  (0.1ms)  SELECT sql
3524
+ FROM sqlite_master
3525
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3526
+ UNION ALL
3527
+ SELECT sql
3528
+ FROM sqlite_temp_master
3529
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3530
+ 
3531
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3532
+  (0.1ms)  SELECT sql
3533
+ FROM sqlite_master
3534
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3535
+ UNION ALL
3536
+ SELECT sql
3537
+ FROM sqlite_temp_master
3538
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3539
+ 
3540
+  (0.1ms)  SELECT sql
3541
+ FROM sqlite_master
3542
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3543
+ UNION ALL
3544
+ SELECT sql
3545
+ FROM sqlite_temp_master
3546
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3547
+ 
3548
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3549
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170905192509"]]
3550
+  (0.8ms) commit transaction
3551
+ Migrating to CreateTerms (20170906193506)
3552
+  (0.0ms) begin transaction
3553
+  (0.3ms) CREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3554
+  (0.1ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3555
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906193506"]]
3556
+  (0.6ms) commit transaction
3557
+ Migrating to CreateSections (20170906203438)
3558
+  (0.0ms) begin transaction
3559
+  (0.3ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3560
+  (0.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3561
+  (0.1ms)  SELECT sql
3562
+ FROM sqlite_master
3563
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3564
+ UNION ALL
3565
+ SELECT sql
3566
+ FROM sqlite_temp_master
3567
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3568
+ 
3569
+  (0.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3570
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906203438"]]
3571
+  (0.7ms) commit transaction
3572
+ Migrating to CreateCourses (20170914181345)
3573
+  (0.0ms) begin transaction
3574
+  (0.3ms) CREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3575
+  (0.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3576
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170914181345"]]
3577
+  (0.7ms) commit transaction
3578
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
3579
+  (0.1ms) begin transaction
3580
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:17:29.585581"], ["updated_at", "2017-09-15 21:17:29.585581"]]
3581
+  (0.6ms) commit transaction
3582
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3583
+  (0.1ms)  SELECT sql
3584
+ FROM sqlite_master
3585
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
3586
+ UNION ALL
3587
+ SELECT sql
3588
+ FROM sqlite_temp_master
3589
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
3590
+ 
3591
+  (0.1ms)  SELECT sql
3592
+ FROM sqlite_master
3593
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
3594
+ UNION ALL
3595
+ SELECT sql
3596
+ FROM sqlite_temp_master
3597
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
3598
+ 
3599
+  (0.1ms)  SELECT sql
3600
+ FROM sqlite_master
3601
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3602
+ UNION ALL
3603
+ SELECT sql
3604
+ FROM sqlite_temp_master
3605
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3606
+ 
3607
+  (0.1ms)  SELECT sql
3608
+ FROM sqlite_master
3609
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3610
+ UNION ALL
3611
+ SELECT sql
3612
+ FROM sqlite_temp_master
3613
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3614
+ 
3615
+  (0.1ms)  SELECT sql
3616
+ FROM sqlite_master
3617
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
3618
+ UNION ALL
3619
+ SELECT sql
3620
+ FROM sqlite_temp_master
3621
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
3622
+ 
3623
+  (0.1ms)  SELECT sql
3624
+ FROM sqlite_master
3625
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3626
+ UNION ALL
3627
+ SELECT sql
3628
+ FROM sqlite_temp_master
3629
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3630
+ 
3631
+  (0.1ms)  SELECT sql
3632
+ FROM sqlite_master
3633
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
3634
+ UNION ALL
3635
+ SELECT sql
3636
+ FROM sqlite_temp_master
3637
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
3638
+ 
3639
+  (0.1ms)  SELECT sql
3640
+ FROM sqlite_master
3641
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
3642
+ UNION ALL
3643
+ SELECT sql
3644
+ FROM sqlite_temp_master
3645
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
3646
+ 
3647
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3648
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3649
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3650
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3651
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3652
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3653
+  (0.6ms) SELECT sqlite_version(*)
3654
+  (7.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3655
+  (1.6ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3656
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3657
+ Migrating to CreateUsers (20170831221129)
3658
+  (0.1ms) begin transaction
3659
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3660
+  (0.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3661
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170831221129"]]
3662
+  (0.7ms) commit transaction
3663
+ Migrating to CreateEnrollments (20170905192509)
3664
+  (0.0ms) begin transaction
3665
+  (0.8ms) CREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3666
+  (0.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3667
+  (0.1ms)  SELECT sql
3668
+ FROM sqlite_master
3669
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3670
+ UNION ALL
3671
+ SELECT sql
3672
+ FROM sqlite_temp_master
3673
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3674
+ 
3675
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3676
+  (0.1ms)  SELECT sql
3677
+ FROM sqlite_master
3678
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3679
+ UNION ALL
3680
+ SELECT sql
3681
+ FROM sqlite_temp_master
3682
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3683
+ 
3684
+  (0.1ms)  SELECT sql
3685
+ FROM sqlite_master
3686
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3687
+ UNION ALL
3688
+ SELECT sql
3689
+ FROM sqlite_temp_master
3690
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3691
+ 
3692
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3693
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170905192509"]]
3694
+  (1.2ms) commit transaction
3695
+ Migrating to CreateTerms (20170906193506)
3696
+  (0.1ms) begin transaction
3697
+  (0.4ms) CREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3698
+  (0.1ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3699
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906193506"]]
3700
+  (1.1ms) commit transaction
3701
+ Migrating to CreateSections (20170906203438)
3702
+  (0.1ms) begin transaction
3703
+  (0.3ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3704
+  (0.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3705
+  (0.1ms)  SELECT sql
3706
+ FROM sqlite_master
3707
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3708
+ UNION ALL
3709
+ SELECT sql
3710
+ FROM sqlite_temp_master
3711
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3712
+ 
3713
+  (0.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3714
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906203438"]]
3715
+  (1.5ms) commit transaction
3716
+ Migrating to CreateCourses (20170914181345)
3717
+  (0.1ms) begin transaction
3718
+  (0.4ms) CREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3719
+  (0.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3720
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170914181345"]]
3721
+  (0.9ms) commit transaction
3722
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
3723
+  (0.1ms) begin transaction
3724
+  (0.3ms) CREATE TABLE "canvas_sync_job_log" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "started_at" datetime, "completed_at" datetime, "exception" varchar, "backtrace" text, "job_class" varchar, "metadata" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3725
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170915210836"]]
3726
+  (0.9ms) commit transaction
3727
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
3728
+  (0.1ms) begin transaction
3729
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:18:47.212758"], ["updated_at", "2017-09-15 21:18:47.212758"]]
3730
+  (1.2ms) commit transaction
3731
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3732
+  (0.1ms)  SELECT sql
3733
+ FROM sqlite_master
3734
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
3735
+ UNION ALL
3736
+ SELECT sql
3737
+ FROM sqlite_temp_master
3738
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
3739
+ 
3740
+  (0.1ms)  SELECT sql
3741
+ FROM sqlite_master
3742
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
3743
+ UNION ALL
3744
+ SELECT sql
3745
+ FROM sqlite_temp_master
3746
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
3747
+ 
3748
+  (0.1ms)  SELECT sql
3749
+ FROM sqlite_master
3750
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3751
+ UNION ALL
3752
+ SELECT sql
3753
+ FROM sqlite_temp_master
3754
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3755
+ 
3756
+  (0.1ms)  SELECT sql
3757
+ FROM sqlite_master
3758
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3759
+ UNION ALL
3760
+ SELECT sql
3761
+ FROM sqlite_temp_master
3762
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3763
+ 
3764
+  (0.1ms)  SELECT sql
3765
+ FROM sqlite_master
3766
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
3767
+ UNION ALL
3768
+ SELECT sql
3769
+ FROM sqlite_temp_master
3770
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
3771
+ 
3772
+  (0.1ms)  SELECT sql
3773
+ FROM sqlite_master
3774
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3775
+ UNION ALL
3776
+ SELECT sql
3777
+ FROM sqlite_temp_master
3778
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3779
+ 
3780
+  (0.1ms)  SELECT sql
3781
+ FROM sqlite_master
3782
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
3783
+ UNION ALL
3784
+ SELECT sql
3785
+ FROM sqlite_temp_master
3786
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
3787
+ 
3788
+  (0.1ms)  SELECT sql
3789
+ FROM sqlite_master
3790
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
3791
+ UNION ALL
3792
+ SELECT sql
3793
+ FROM sqlite_temp_master
3794
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
3795
+ 
3796
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3797
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3798
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3799
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3800
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3801
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3802
+  (0.1ms) SELECT sqlite_version(*)
3803
+  (6.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3804
+  (1.6ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3805
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3806
+ Migrating to CreateUsers (20170831221129)
3807
+  (0.1ms) begin transaction
3808
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3809
+  (0.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3810
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170831221129"]]
3811
+  (0.9ms) commit transaction
3812
+ Migrating to CreateEnrollments (20170905192509)
3813
+  (0.1ms) begin transaction
3814
+  (0.4ms) CREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3815
+  (0.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3816
+  (0.1ms)  SELECT sql
3817
+ FROM sqlite_master
3818
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3819
+ UNION ALL
3820
+ SELECT sql
3821
+ FROM sqlite_temp_master
3822
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3823
+ 
3824
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3825
+  (0.1ms)  SELECT sql
3826
+ FROM sqlite_master
3827
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3828
+ UNION ALL
3829
+ SELECT sql
3830
+ FROM sqlite_temp_master
3831
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3832
+ 
3833
+  (0.1ms)  SELECT sql
3834
+ FROM sqlite_master
3835
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3836
+ UNION ALL
3837
+ SELECT sql
3838
+ FROM sqlite_temp_master
3839
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3840
+ 
3841
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3842
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170905192509"]]
3843
+  (0.7ms) commit transaction
3844
+ Migrating to CreateTerms (20170906193506)
3845
+  (0.0ms) begin transaction
3846
+  (0.3ms) CREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3847
+  (0.1ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3848
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906193506"]]
3849
+  (1.0ms) commit transaction
3850
+ Migrating to CreateSections (20170906203438)
3851
+  (0.0ms) begin transaction
3852
+  (0.3ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3853
+  (0.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3854
+  (0.1ms)  SELECT sql
3855
+ FROM sqlite_master
3856
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3857
+ UNION ALL
3858
+ SELECT sql
3859
+ FROM sqlite_temp_master
3860
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3861
+ 
3862
+  (0.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3863
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906203438"]]
3864
+  (0.8ms) commit transaction
3865
+ Migrating to CreateCourses (20170914181345)
3866
+  (0.1ms) begin transaction
3867
+  (0.3ms) CREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3868
+  (0.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3869
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170914181345"]]
3870
+  (0.9ms) commit transaction
3871
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
3872
+  (0.0ms) begin transaction
3873
+  (0.3ms) CREATE TABLE "canvas_sync_job_logs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "started_at" datetime, "completed_at" datetime, "exception" varchar, "backtrace" text, "job_class" varchar, "metadata" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3874
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170915210836"]]
3875
+  (1.1ms) commit transaction
3876
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
3877
+  (0.0ms) begin transaction
3878
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:19:15.229214"], ["updated_at", "2017-09-15 21:19:15.229214"]]
3879
+  (0.7ms) commit transaction
3880
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3881
+  (0.1ms)  SELECT sql
3882
+ FROM sqlite_master
3883
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
3884
+ UNION ALL
3885
+ SELECT sql
3886
+ FROM sqlite_temp_master
3887
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
3888
+ 
3889
+  (0.1ms)  SELECT sql
3890
+ FROM sqlite_master
3891
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
3892
+ UNION ALL
3893
+ SELECT sql
3894
+ FROM sqlite_temp_master
3895
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
3896
+ 
3897
+  (0.1ms)  SELECT sql
3898
+ FROM sqlite_master
3899
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3900
+ UNION ALL
3901
+ SELECT sql
3902
+ FROM sqlite_temp_master
3903
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3904
+ 
3905
+  (0.1ms)  SELECT sql
3906
+ FROM sqlite_master
3907
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3908
+ UNION ALL
3909
+ SELECT sql
3910
+ FROM sqlite_temp_master
3911
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3912
+ 
3913
+  (0.1ms)  SELECT sql
3914
+ FROM sqlite_master
3915
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
3916
+ UNION ALL
3917
+ SELECT sql
3918
+ FROM sqlite_temp_master
3919
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
3920
+ 
3921
+  (0.1ms)  SELECT sql
3922
+ FROM sqlite_master
3923
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3924
+ UNION ALL
3925
+ SELECT sql
3926
+ FROM sqlite_temp_master
3927
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
3928
+ 
3929
+  (0.1ms)  SELECT sql
3930
+ FROM sqlite_master
3931
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
3932
+ UNION ALL
3933
+ SELECT sql
3934
+ FROM sqlite_temp_master
3935
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
3936
+ 
3937
+  (0.1ms)  SELECT sql
3938
+ FROM sqlite_master
3939
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
3940
+ UNION ALL
3941
+ SELECT sql
3942
+ FROM sqlite_temp_master
3943
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
3944
+ 
3945
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3946
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3947
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3948
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3949
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3950
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
3951
+  (0.1ms) SELECT sqlite_version(*)
3952
+  (6.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3953
+  (0.8ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3954
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3955
+ Migrating to CreateUsers (20170831221129)
3956
+  (0.1ms) begin transaction
3957
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3958
+  (0.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3959
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170831221129"]]
3960
+  (0.9ms) commit transaction
3961
+ Migrating to CreateEnrollments (20170905192509)
3962
+  (0.0ms) begin transaction
3963
+  (0.3ms) CREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3964
+  (0.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3965
+  (0.1ms)  SELECT sql
3966
+ FROM sqlite_master
3967
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3968
+ UNION ALL
3969
+ SELECT sql
3970
+ FROM sqlite_temp_master
3971
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3972
+ 
3973
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3974
+  (0.1ms)  SELECT sql
3975
+ FROM sqlite_master
3976
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3977
+ UNION ALL
3978
+ SELECT sql
3979
+ FROM sqlite_temp_master
3980
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
3981
+ 
3982
+  (0.1ms)  SELECT sql
3983
+ FROM sqlite_master
3984
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3985
+ UNION ALL
3986
+ SELECT sql
3987
+ FROM sqlite_temp_master
3988
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
3989
+ 
3990
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3991
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170905192509"]]
3992
+  (0.8ms) commit transaction
3993
+ Migrating to CreateTerms (20170906193506)
3994
+  (0.1ms) begin transaction
3995
+  (0.4ms) CREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3996
+  (0.1ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3997
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906193506"]]
3998
+  (1.1ms) commit transaction
3999
+ Migrating to CreateSections (20170906203438)
4000
+  (0.1ms) begin transaction
4001
+  (0.5ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4002
+  (0.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
4003
+  (0.1ms)  SELECT sql
4004
+ FROM sqlite_master
4005
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
4006
+ UNION ALL
4007
+ SELECT sql
4008
+ FROM sqlite_temp_master
4009
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
4010
+ 
4011
+  (0.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
4012
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906203438"]]
4013
+  (1.3ms) commit transaction
4014
+ Migrating to CreateCourses (20170914181345)
4015
+  (0.1ms) begin transaction
4016
+  (0.4ms) CREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4017
+  (0.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
4018
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170914181345"]]
4019
+  (1.1ms) commit transaction
4020
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
4021
+  (0.1ms) begin transaction
4022
+  (0.3ms) CREATE TABLE "canvas_sync_job_logs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "started_at" datetime, "completed_at" datetime, "exception" varchar, "backtrace" text, "job_class" varchar, "metadata" text, "job_arguments" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4023
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170915210836"]]
4024
+  (0.9ms) commit transaction
4025
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
4026
+  (0.0ms) begin transaction
4027
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:35:28.273157"], ["updated_at", "2017-09-15 21:35:28.273157"]]
4028
+  (0.7ms) commit transaction
4029
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4030
+  (0.1ms)  SELECT sql
4031
+ FROM sqlite_master
4032
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
4033
+ UNION ALL
4034
+ SELECT sql
4035
+ FROM sqlite_temp_master
4036
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
4037
+ 
4038
+  (0.1ms)  SELECT sql
4039
+ FROM sqlite_master
4040
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
4041
+ UNION ALL
4042
+ SELECT sql
4043
+ FROM sqlite_temp_master
4044
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
4045
+ 
4046
+  (0.1ms)  SELECT sql
4047
+ FROM sqlite_master
4048
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
4049
+ UNION ALL
4050
+ SELECT sql
4051
+ FROM sqlite_temp_master
4052
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
4053
+ 
4054
+  (0.1ms)  SELECT sql
4055
+ FROM sqlite_master
4056
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
4057
+ UNION ALL
4058
+ SELECT sql
4059
+ FROM sqlite_temp_master
4060
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
4061
+ 
4062
+  (0.1ms)  SELECT sql
4063
+ FROM sqlite_master
4064
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
4065
+ UNION ALL
4066
+ SELECT sql
4067
+ FROM sqlite_temp_master
4068
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
4069
+ 
4070
+  (0.1ms)  SELECT sql
4071
+ FROM sqlite_master
4072
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
4073
+ UNION ALL
4074
+ SELECT sql
4075
+ FROM sqlite_temp_master
4076
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
4077
+ 
4078
+  (0.1ms)  SELECT sql
4079
+ FROM sqlite_master
4080
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
4081
+ UNION ALL
4082
+ SELECT sql
4083
+ FROM sqlite_temp_master
4084
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
4085
+ 
4086
+  (0.1ms)  SELECT sql
4087
+ FROM sqlite_master
4088
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
4089
+ UNION ALL
4090
+ SELECT sql
4091
+ FROM sqlite_temp_master
4092
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
4093
+ 
4094
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4095
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
4096
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4097
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
4098
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4099
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
4100
+  (0.1ms) SELECT sqlite_version(*)
4101
+  (7.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
4102
+  (1.8ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4103
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4104
+ Migrating to CreateUsers (20170831221129)
4105
+  (0.1ms) begin transaction
4106
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4107
+  (0.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
4108
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170831221129"]]
4109
+  (1.7ms) commit transaction
4110
+ Migrating to CreateEnrollments (20170905192509)
4111
+  (0.1ms) begin transaction
4112
+  (0.3ms) CREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4113
+  (0.6ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
4114
+  (0.1ms)  SELECT sql
4115
+ FROM sqlite_master
4116
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
4117
+ UNION ALL
4118
+ SELECT sql
4119
+ FROM sqlite_temp_master
4120
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
4121
+ 
4122
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
4123
+  (0.1ms)  SELECT sql
4124
+ FROM sqlite_master
4125
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
4126
+ UNION ALL
4127
+ SELECT sql
4128
+ FROM sqlite_temp_master
4129
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
4130
+ 
4131
+  (0.1ms)  SELECT sql
4132
+ FROM sqlite_master
4133
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
4134
+ UNION ALL
4135
+ SELECT sql
4136
+ FROM sqlite_temp_master
4137
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
4138
+ 
4139
+  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
4140
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170905192509"]]
4141
+  (1.6ms) commit transaction
4142
+ Migrating to CreateTerms (20170906193506)
4143
+  (0.1ms) begin transaction
4144
+  (0.4ms) CREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4145
+  (0.1ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
4146
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906193506"]]
4147
+  (0.9ms) commit transaction
4148
+ Migrating to CreateSections (20170906203438)
4149
+  (0.1ms) begin transaction
4150
+  (0.4ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4151
+  (0.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
4152
+  (0.1ms)  SELECT sql
4153
+ FROM sqlite_master
4154
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
4155
+ UNION ALL
4156
+ SELECT sql
4157
+ FROM sqlite_temp_master
4158
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
4159
+ 
4160
+  (0.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
4161
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906203438"]]
4162
+  (1.0ms) commit transaction
4163
+ Migrating to CreateCourses (20170914181345)
4164
+  (0.1ms) begin transaction
4165
+  (0.4ms) CREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4166
+  (0.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
4167
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170914181345"]]
4168
+  (1.0ms) commit transaction
4169
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
4170
+  (0.1ms) begin transaction
4171
+  (0.4ms) CREATE TABLE "canvas_sync_job_logs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "started_at" datetime, "completed_at" datetime, "exception" varchar, "backtrace" text, "job_class" varchar, "metadata" text, "job_arguments" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4172
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170915210836"]]
4173
+  (1.3ms) commit transaction
4174
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
4175
+  (0.1ms) begin transaction
4176
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:36:11.447580"], ["updated_at", "2017-09-15 21:36:11.447580"]]
4177
+  (0.7ms) commit transaction
4178
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4179
+  (0.1ms)  SELECT sql
4180
+ FROM sqlite_master
4181
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
4182
+ UNION ALL
4183
+ SELECT sql
4184
+ FROM sqlite_temp_master
4185
+ WHERE name='index_courses_on_canvas_course_id' AND type='index'
4186
+ 
4187
+  (0.1ms)  SELECT sql
4188
+ FROM sqlite_master
4189
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
4190
+ UNION ALL
4191
+ SELECT sql
4192
+ FROM sqlite_temp_master
4193
+ WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
4194
+ 
4195
+  (0.1ms)  SELECT sql
4196
+ FROM sqlite_master
4197
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
4198
+ UNION ALL
4199
+ SELECT sql
4200
+ FROM sqlite_temp_master
4201
+ WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
4202
+ 
4203
+  (0.1ms)  SELECT sql
4204
+ FROM sqlite_master
4205
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
4206
+ UNION ALL
4207
+ SELECT sql
4208
+ FROM sqlite_temp_master
4209
+ WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
4210
+ 
4211
+  (0.1ms)  SELECT sql
4212
+ FROM sqlite_master
4213
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
4214
+ UNION ALL
4215
+ SELECT sql
4216
+ FROM sqlite_temp_master
4217
+ WHERE name='index_sections_on_canvas_course_id' AND type='index'
4218
+ 
4219
+  (0.1ms)  SELECT sql
4220
+ FROM sqlite_master
4221
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
4222
+ UNION ALL
4223
+ SELECT sql
4224
+ FROM sqlite_temp_master
4225
+ WHERE name='index_sections_on_canvas_section_id' AND type='index'
4226
+ 
4227
+  (0.1ms)  SELECT sql
4228
+ FROM sqlite_master
4229
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
4230
+ UNION ALL
4231
+ SELECT sql
4232
+ FROM sqlite_temp_master
4233
+ WHERE name='index_terms_on_canvas_term_id' AND type='index'
4234
+ 
4235
+  (0.1ms)  SELECT sql
4236
+ FROM sqlite_master
4237
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
4238
+ UNION ALL
4239
+ SELECT sql
4240
+ FROM sqlite_temp_master
4241
+ WHERE name='index_users_on_canvas_user_id' AND type='index'
3502
4242
  
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Collings
@@ -178,6 +178,34 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: pry
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: pry-nav
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
181
209
  - !ruby/object:Gem::Dependency
182
210
  name: activejob
183
211
  requirement: !ruby/object:Gem::Requirement
@@ -257,7 +285,10 @@ extra_rdoc_files: []
257
285
  files:
258
286
  - README.md
259
287
  - Rakefile
288
+ - app/models/canvas_sync/job_log.rb
289
+ - db/migrate/20170915210836_create_canvas_sync_job_log.rb
260
290
  - lib/canvas_sync.rb
291
+ - lib/canvas_sync/engine.rb
261
292
  - lib/canvas_sync/generators/install_generator.rb
262
293
  - lib/canvas_sync/generators/templates/course.rb
263
294
  - lib/canvas_sync/generators/templates/create_courses.rb
@@ -270,7 +301,7 @@ files:
270
301
  - lib/canvas_sync/generators/templates/term.rb
271
302
  - lib/canvas_sync/generators/templates/user.rb
272
303
  - lib/canvas_sync/importers/bulk_importer.rb
273
- - lib/canvas_sync/jobs/application_job.rb
304
+ - lib/canvas_sync/job.rb
274
305
  - lib/canvas_sync/jobs/report_checker.rb
275
306
  - lib/canvas_sync/jobs/report_processor_job.rb
276
307
  - lib/canvas_sync/jobs/report_starter.rb
@@ -280,6 +311,7 @@ files:
280
311
  - lib/canvas_sync/processors/provisioning_report_processor.rb
281
312
  - lib/canvas_sync/version.rb
282
313
  - spec/canvas_sync/canvas_sync_spec.rb
314
+ - spec/canvas_sync/jobs/job_spec.rb
283
315
  - spec/canvas_sync/jobs/report_checker_spec.rb
284
316
  - spec/canvas_sync/jobs/report_processor_job_spec.rb
285
317
  - spec/canvas_sync/jobs/report_starter_spec.rb
@@ -363,6 +395,7 @@ specification_version: 4
363
395
  summary: Gem for generating Canvas models and migrations and syncing data from Canvas
364
396
  test_files:
365
397
  - spec/canvas_sync/canvas_sync_spec.rb
398
+ - spec/canvas_sync/jobs/job_spec.rb
366
399
  - spec/canvas_sync/jobs/report_checker_spec.rb
367
400
  - spec/canvas_sync/jobs/report_processor_job_spec.rb
368
401
  - spec/canvas_sync/jobs/report_starter_spec.rb
@@ -1,16 +0,0 @@
1
- require "active_job"
2
-
3
- module CanvasSync
4
- module Jobs
5
- # Inherit from this class to build a Job that integrates
6
- # well with this gem.
7
- class ApplicationJob < ActiveJob::Base
8
- # Returns the amount of time to wait between report status checks
9
- #
10
- # @return [Integer]
11
- def report_checker_wait_time
12
- Rails.env.development? ? 1.second : 30.seconds
13
- end
14
- end
15
- end
16
- end