canvas_sync 0.22.3 → 0.22.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/Rakefile +0 -0
- data/app/controllers/canvas_sync/api/v1/health_check_controller.rb +0 -0
- data/app/controllers/canvas_sync/api/v1/live_events_controller.rb +0 -0
- data/app/models/canvas_sync/job_log.rb +5 -1
- data/app/models/canvas_sync/sync_batch.rb +0 -1
- data/config/initializers/apartment.rb +0 -0
- data/config/routes.rb +0 -0
- data/db/migrate/20170915210836_create_canvas_sync_job_log.rb +0 -0
- data/db/migrate/20180725155729_add_job_id_to_canvas_sync_job_logs.rb +0 -0
- data/db/migrate/20190916154829_add_fork_count_to_canvas_sync_job_logs.rb +0 -0
- data/db/migrate/20201018210836_create_canvas_sync_sync_batches.rb +0 -0
- data/db/migrate/20201030210836_add_full_sync_to_canvas_sync_sync_batch.rb +0 -0
- data/lib/canvas_sync/api_syncable.rb +0 -0
- data/lib/canvas_sync/batch_processor.rb +0 -0
- data/lib/canvas_sync/class_callback_executor.rb +0 -0
- data/lib/canvas_sync/concerns/ability_helper.rb +0 -0
- data/lib/canvas_sync/concerns/account/ancestry.rb +0 -0
- data/lib/canvas_sync/concerns/account/base.rb +0 -0
- data/lib/canvas_sync/concerns/api_syncable.rb +0 -0
- data/lib/canvas_sync/concerns/auto_relations.rb +0 -0
- data/lib/canvas_sync/concerns/legacy_columns.rb +0 -0
- data/lib/canvas_sync/concerns/live_event_sync.rb +0 -0
- data/lib/canvas_sync/concerns/role/base.rb +0 -0
- data/lib/canvas_sync/concerns/sync_mapping.rb +0 -0
- data/lib/canvas_sync/config.rb +0 -0
- data/lib/canvas_sync/engine.rb +0 -0
- data/lib/canvas_sync/generators/install_generator.rb +0 -0
- data/lib/canvas_sync/generators/install_live_events_generator.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_accounts.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_admins.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_assignment_groups.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_assignments.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_content_migrations.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_context_module_items.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_context_modules.rb +2 -0
- data/lib/canvas_sync/generators/templates/migrations/create_course_nicknames.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_course_progresses.rb +20 -0
- data/lib/canvas_sync/generators/templates/migrations/create_courses.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_enrollments.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_grading_period_groups.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_grading_periods.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_group_memberships.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_groups.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_learning_outcome_results.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_learning_outcomes.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_pseudonyms.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_roles.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_rubric_assessments.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_rubric_associations.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_rubrics.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_sections.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_submissions.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_terms.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_user_observers.rb +0 -0
- data/lib/canvas_sync/generators/templates/migrations/create_users.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/account.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/admin.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/assignment.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/assignment_group.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/content_migration.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/context_module.rb +36 -2
- data/lib/canvas_sync/generators/templates/models/context_module_item.rb +11 -3
- data/lib/canvas_sync/generators/templates/models/course.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/course_nickname.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/course_progress.rb +14 -0
- data/lib/canvas_sync/generators/templates/models/enrollment.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/grading_period.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/grading_period_group.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/group.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/group_membership.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/learning_outcome.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/learning_outcome_result.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/pseudonym.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/role.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/rubric.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/rubric_assessment.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/rubric_association.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/section.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/submission.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/term.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/user.rb +0 -0
- data/lib/canvas_sync/generators/templates/models/user_observer.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/assignment_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/assignment_group_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/course_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/course_section_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/enrollment_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/grade_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/module_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/module_item_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/submission_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/syllabus_event.rb +0 -0
- data/lib/canvas_sync/generators/templates/services/live_events/user_event.rb +0 -0
- data/lib/canvas_sync/importers/bulk_importer.rb +3 -0
- data/lib/canvas_sync/importers/legacy_importer.rb +0 -0
- data/lib/canvas_sync/job.rb +0 -0
- data/lib/canvas_sync/job_batches/batch.rb +0 -0
- data/lib/canvas_sync/job_batches/callback.rb +0 -0
- data/lib/canvas_sync/job_batches/chain_builder.rb +24 -3
- data/lib/canvas_sync/job_batches/compat/active_job.rb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/batches_assets/css/styles.less +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/batches_assets/js/batch_tree.js +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/batches_assets/js/util.js +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/helpers.rb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_batch_tree.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_batches_table.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_common.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_jobs_table.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/_pagination.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/batch.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/batches.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/pool.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web/views/pools.erb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq/web.rb +0 -0
- data/lib/canvas_sync/job_batches/compat/sidekiq.rb +0 -0
- data/lib/canvas_sync/job_batches/compat.rb +0 -0
- data/lib/canvas_sync/job_batches/context_hash.rb +0 -0
- data/lib/canvas_sync/job_batches/hier_batch_ids.lua +0 -0
- data/lib/canvas_sync/job_batches/jobs/base_job.rb +0 -0
- data/lib/canvas_sync/job_batches/jobs/concurrent_batch_job.rb +0 -0
- data/lib/canvas_sync/job_batches/jobs/managed_batch_job.rb +4 -0
- data/lib/canvas_sync/job_batches/jobs/serial_batch_job.rb +0 -0
- data/lib/canvas_sync/job_batches/pool.rb +0 -0
- data/lib/canvas_sync/job_batches/pool_refill.lua +0 -0
- data/lib/canvas_sync/job_batches/redis_model.rb +0 -0
- data/lib/canvas_sync/job_batches/redis_script.rb +0 -0
- data/lib/canvas_sync/job_batches/schedule_callback.lua +0 -0
- data/lib/canvas_sync/job_batches/status.rb +1 -0
- data/lib/canvas_sync/job_uniqueness/compat/active_job.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/compat/sidekiq.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/compat.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/configuration.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/job_uniqueness.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/lock_context.rb +15 -3
- data/lib/canvas_sync/job_uniqueness/locksmith.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/base.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/log.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/null_strategy.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/raise.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/reject.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict/reschedule.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/on_conflict.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/base.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/until_and_while_executing.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/until_executed.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/until_executing.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/until_expired.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy/while_executing.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/strategy.rb +0 -0
- data/lib/canvas_sync/job_uniqueness/unique_job_common.rb +0 -0
- data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +0 -0
- data/lib/canvas_sync/jobs/canvas_process_waiter.rb +0 -0
- data/lib/canvas_sync/jobs/report_checker.rb +0 -0
- data/lib/canvas_sync/jobs/report_processor_job.rb +0 -0
- data/lib/canvas_sync/jobs/report_starter.rb +0 -0
- data/lib/canvas_sync/jobs/sync_accounts_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_admins_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_assignment_groups_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_assignments_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_content_migrations_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_context_module_items_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_context_modules_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_course_progresses_job.rb +21 -0
- data/lib/canvas_sync/jobs/sync_provisioning_report_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_roles_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_rubric_assessments_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_rubric_associations_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_rubrics_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_simple_table_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_submissions_job.rb +0 -0
- data/lib/canvas_sync/jobs/sync_terms_job.rb +0 -0
- data/lib/canvas_sync/jobs/term_batches_job.rb +4 -1
- data/lib/canvas_sync/live_events/base_handler.rb +0 -0
- data/lib/canvas_sync/live_events/process_event_job.rb +0 -0
- data/lib/canvas_sync/live_events.rb +0 -0
- data/lib/canvas_sync/misc_helper.rb +0 -0
- data/lib/canvas_sync/processors/assignment_groups_processor.rb +0 -0
- data/lib/canvas_sync/processors/assignments_processor.rb +0 -0
- data/lib/canvas_sync/processors/content_migrations_processor.rb +0 -0
- data/lib/canvas_sync/processors/context_module_items_processor.rb +0 -0
- data/lib/canvas_sync/processors/context_modules_processor.rb +0 -0
- data/lib/canvas_sync/processors/course_completion_report_processor.rb +20 -0
- data/lib/canvas_sync/processors/model_mappings.yml +27 -0
- data/lib/canvas_sync/processors/normal_processor.rb +0 -0
- data/lib/canvas_sync/processors/provisioning_report_processor.rb +0 -0
- data/lib/canvas_sync/processors/report_processor.rb +0 -0
- data/lib/canvas_sync/processors/rubric_assessments_processor.rb +0 -0
- data/lib/canvas_sync/processors/rubric_associations_processor.rb +0 -0
- data/lib/canvas_sync/processors/rubrics_processor.rb +0 -0
- data/lib/canvas_sync/processors/submissions_processor.rb +0 -0
- data/lib/canvas_sync/record.rb +0 -0
- data/lib/canvas_sync/sidekiq_job.rb +0 -0
- data/lib/canvas_sync/version.rb +1 -1
- data/lib/canvas_sync.rb +4 -0
- data/spec/canvas_sync/canvas_sync_spec.rb +59 -41
- data/spec/canvas_sync/jobs/canvas_process_waiter_spec.rb +0 -0
- data/spec/canvas_sync/jobs/job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/report_checker_spec.rb +0 -0
- data/spec/canvas_sync/jobs/report_processor_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/report_starter_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_admins_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_assignment_groups_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_assignments_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_content_migrations_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_context_module_items_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_context_modules_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_roles_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_simple_table_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_submissions_job_spec.rb +0 -0
- data/spec/canvas_sync/jobs/sync_terms_job_spec.rb +0 -0
- data/spec/canvas_sync/live_events/live_event_sync_spec.rb +0 -0
- data/spec/canvas_sync/live_events/live_events_controller_spec.rb +0 -0
- data/spec/canvas_sync/live_events/process_event_job_spec.rb +0 -0
- data/spec/canvas_sync/misc_helper_spec.rb +0 -0
- data/spec/canvas_sync/models/accounts_spec.rb +0 -0
- data/spec/canvas_sync/models/admins_spec.rb +0 -0
- data/spec/canvas_sync/models/assignment_group_spec.rb +0 -0
- data/spec/canvas_sync/models/assignment_spec.rb +0 -0
- data/spec/canvas_sync/models/context_module_item_spec.rb +0 -0
- data/spec/canvas_sync/models/context_module_spec.rb +0 -0
- data/spec/canvas_sync/models/course_spec.rb +0 -0
- data/spec/canvas_sync/models/enrollment_spec.rb +0 -0
- data/spec/canvas_sync/models/group_membership_spec.rb +0 -0
- data/spec/canvas_sync/models/group_spec.rb +0 -0
- data/spec/canvas_sync/models/roles_spec.rb +0 -0
- data/spec/canvas_sync/models/section_spec.rb +0 -0
- data/spec/canvas_sync/models/submission_spec.rb +0 -0
- data/spec/canvas_sync/models/term_spec.rb +0 -0
- data/spec/canvas_sync/models/user_spec.rb +0 -0
- data/spec/canvas_sync/processors/assignment_groups_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/assignments_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/content_migrations_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/context_module_items_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/context_modules_processor_spec.rb +14 -0
- data/spec/canvas_sync/processors/course_completion_report_processor_spec.rb +47 -0
- data/spec/canvas_sync/processors/normal_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/provisioning_report_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/rubric_assessments_spec.rb +0 -0
- data/spec/canvas_sync/processors/rubric_associations_spec.rb +0 -0
- data/spec/canvas_sync/processors/rubrics_processor_spec.rb +0 -0
- data/spec/canvas_sync/processors/submissions_processor_spec.rb +0 -0
- data/spec/canvas_sync/services/module_event_spec.rb +0 -0
- data/spec/canvas_sync/services/module_item_event_spec.rb +0 -0
- data/spec/dummy/README.rdoc +0 -0
- data/spec/dummy/Rakefile +0 -0
- data/spec/dummy/app/models/account.rb +0 -0
- data/spec/dummy/app/models/admin.rb +0 -0
- data/spec/dummy/app/models/application_record.rb +0 -0
- data/spec/dummy/app/models/assignment.rb +0 -0
- data/spec/dummy/app/models/assignment_group.rb +0 -0
- data/spec/dummy/app/models/content_migration.rb +0 -0
- data/spec/dummy/app/models/context_module.rb +36 -2
- data/spec/dummy/app/models/context_module_item.rb +11 -3
- data/spec/dummy/app/models/course.rb +0 -0
- data/spec/dummy/app/models/course_nickname.rb +0 -0
- data/spec/dummy/app/models/course_progress.rb +20 -0
- data/spec/dummy/app/models/enrollment.rb +0 -0
- data/spec/dummy/app/models/grading_period.rb +0 -0
- data/spec/dummy/app/models/grading_period_group.rb +0 -0
- data/spec/dummy/app/models/group.rb +0 -0
- data/spec/dummy/app/models/group_membership.rb +0 -0
- data/spec/dummy/app/models/learning_outcome.rb +0 -0
- data/spec/dummy/app/models/learning_outcome_result.rb +0 -0
- data/spec/dummy/app/models/pseudonym.rb +0 -0
- data/spec/dummy/app/models/role.rb +0 -0
- data/spec/dummy/app/models/rubric.rb +0 -0
- data/spec/dummy/app/models/rubric_assessment.rb +0 -0
- data/spec/dummy/app/models/rubric_association.rb +0 -0
- data/spec/dummy/app/models/section.rb +0 -0
- data/spec/dummy/app/models/submission.rb +0 -0
- data/spec/dummy/app/models/term.rb +0 -0
- data/spec/dummy/app/models/user.rb +0 -0
- data/spec/dummy/app/models/user_observer.rb +0 -0
- data/spec/dummy/app/services/live_events/assignment_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/assignment_event.rb +0 -0
- data/spec/dummy/app/services/live_events/assignment_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/base_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_section_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_section_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_section_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/course_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/enrollment_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/enrollment_event.rb +0 -0
- data/spec/dummy/app/services/live_events/enrollment_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/grade_changed_event.rb +0 -0
- data/spec/dummy/app/services/live_events/grade_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_item_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_item_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_item_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/module_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/submission_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/submission_event.rb +0 -0
- data/spec/dummy/app/services/live_events/submission_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/syllabus_event.rb +0 -0
- data/spec/dummy/app/services/live_events/syllabus_updated_event.rb +0 -0
- data/spec/dummy/app/services/live_events/user_created_event.rb +0 -0
- data/spec/dummy/app/services/live_events/user_event.rb +0 -0
- data/spec/dummy/app/services/live_events/user_updated_event.rb +0 -0
- data/spec/dummy/config/application.rb +0 -0
- data/spec/dummy/config/boot.rb +0 -0
- data/spec/dummy/config/database.yml +0 -0
- data/spec/dummy/config/environment.rb +0 -0
- data/spec/dummy/config/environments/development.rb +0 -0
- data/spec/dummy/config/environments/test.rb +0 -0
- data/spec/dummy/config/initializers/assets.rb +0 -0
- data/spec/dummy/config/initializers/session_store.rb +0 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/spec/dummy/config/routes.rb +0 -0
- data/spec/dummy/config/secrets.yml +0 -0
- data/spec/dummy/config.ru +0 -0
- data/spec/dummy/db/migrate/20190702203621_create_courses.rb +0 -0
- data/spec/dummy/db/migrate/20190702203622_create_accounts.rb +0 -0
- data/spec/dummy/db/migrate/20190702203623_create_terms.rb +0 -0
- data/spec/dummy/db/migrate/20190702203624_create_enrollments.rb +0 -0
- data/spec/dummy/db/migrate/20190702203625_create_sections.rb +0 -0
- data/spec/dummy/db/migrate/20190702203626_create_assignments.rb +0 -0
- data/spec/dummy/db/migrate/20190702203627_create_submissions.rb +0 -0
- data/spec/dummy/db/migrate/20190702203630_create_assignment_groups.rb +0 -0
- data/spec/dummy/db/migrate/20190702203631_create_context_modules.rb +2 -0
- data/spec/dummy/db/migrate/20190702203632_create_context_module_items.rb +0 -0
- data/spec/dummy/db/migrate/20190927204545_create_roles.rb +0 -0
- data/spec/dummy/db/migrate/20190927204546_create_admins.rb +0 -0
- data/spec/dummy/db/migrate/20200415171620_create_groups.rb +0 -0
- data/spec/dummy/db/migrate/20200416214248_create_group_memberships.rb +0 -0
- data/spec/dummy/db/migrate/20201016181346_create_pseudonyms.rb +0 -0
- data/spec/dummy/db/migrate/20210907233329_create_user_observers.rb +0 -0
- data/spec/dummy/db/migrate/20210907233330_create_grading_periods.rb +0 -0
- data/spec/dummy/db/migrate/20211001184920_create_grading_period_groups.rb +0 -0
- data/spec/dummy/db/migrate/20220308072643_create_content_migrations.rb +0 -0
- data/spec/dummy/db/migrate/20220712210559_create_learning_outcomes.rb +0 -0
- data/spec/dummy/db/migrate/20220926221926_create_users.rb +0 -0
- data/spec/dummy/db/migrate/20240408223326_create_course_nicknames.rb +0 -0
- data/spec/dummy/db/migrate/20240509105100_create_rubrics.rb +0 -0
- data/spec/dummy/db/migrate/20240510094100_create_rubric_associations.rb +0 -0
- data/spec/dummy/db/migrate/20240510101100_create_rubric_assessments.rb +0 -0
- data/spec/dummy/db/migrate/20240523101010_create_learning_outcome_results.rb +0 -0
- data/spec/dummy/db/migrate/20240828161300_create_course_progresses.rb +26 -0
- data/spec/dummy/db/schema.rb +15 -0
- data/spec/factories/account_factory.rb +0 -0
- data/spec/factories/admin_factory.rb +0 -0
- data/spec/factories/assignment_factory.rb +0 -0
- data/spec/factories/assignment_group_factory.rb +0 -0
- data/spec/factories/context_module_factory.rb +0 -0
- data/spec/factories/context_module_item_factory.rb +0 -0
- data/spec/factories/course_factory.rb +0 -0
- data/spec/factories/enrollment_factory.rb +0 -0
- data/spec/factories/group_factory.rb +0 -0
- data/spec/factories/group_membership_factory.rb +0 -0
- data/spec/factories/role_factory.rb +0 -0
- data/spec/factories/section_factory.rb +0 -0
- data/spec/factories/submission_factory.rb +0 -0
- data/spec/factories/term_factory.rb +0 -0
- data/spec/factories/user_factory.rb +0 -0
- data/spec/job_batching/batch_spec.rb +0 -0
- data/spec/job_batching/callback_spec.rb +0 -0
- data/spec/job_batching/compat/active_job_spec.rb +0 -0
- data/spec/job_batching/compat/sidekiq_spec.rb +0 -0
- data/spec/job_batching/context_hash_spec.rb +0 -0
- data/spec/job_batching/flow_spec.rb +0 -0
- data/spec/job_batching/integration/fail_then_succeed.rb +0 -0
- data/spec/job_batching/integration/integration.rb +0 -0
- data/spec/job_batching/integration/nested.rb +0 -0
- data/spec/job_batching/integration/simple.rb +0 -0
- data/spec/job_batching/integration/workflow.rb +0 -0
- data/spec/job_batching/integration_helper.rb +0 -0
- data/spec/job_batching/pool_spec.rb +0 -0
- data/spec/job_batching/status_spec.rb +0 -0
- data/spec/job_batching/support/base_job.rb +0 -0
- data/spec/job_batching/support/sample_callback.rb +0 -0
- data/spec/job_uniqueness/compat/active_job_spec.rb +0 -0
- data/spec/job_uniqueness/compat/sidekiq_spec.rb +0 -0
- data/spec/job_uniqueness/lock_context_spec.rb +0 -0
- data/spec/job_uniqueness/on_conflict/log_spec.rb +0 -0
- data/spec/job_uniqueness/on_conflict/raise_spec.rb +0 -0
- data/spec/job_uniqueness/on_conflict/reschedule_spec.rb +0 -0
- data/spec/job_uniqueness/on_conflict_spec.rb +0 -0
- data/spec/job_uniqueness/spec_helper.rb +0 -0
- data/spec/job_uniqueness/strategy/base_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/until_and_while_executing_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/until_executed_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/until_executing_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/until_expired_spec.rb +0 -0
- data/spec/job_uniqueness/strategy/while_executing_spec.rb +0 -0
- data/spec/job_uniqueness/support/lock_strategy.rb +0 -0
- data/spec/job_uniqueness/support/on_conflict.rb +0 -0
- data/spec/job_uniqueness/support/test_worker.rb +0 -0
- data/spec/job_uniqueness/unique_job_common_spec.rb +0 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/support/fake_canvas.rb +0 -0
- data/spec/support/fixtures/canvas_responses/admins.json +0 -0
- data/spec/support/fixtures/canvas_responses/module.json +0 -0
- data/spec/support/fixtures/canvas_responses/module_item.json +0 -0
- data/spec/support/fixtures/canvas_responses/roles.json +0 -0
- data/spec/support/fixtures/canvas_responses/terms.json +0 -0
- data/spec/support/fixtures/reports/assignment_groups.csv +0 -0
- data/spec/support/fixtures/reports/assignments.csv +0 -0
- data/spec/support/fixtures/reports/content_migrations.csv +0 -0
- data/spec/support/fixtures/reports/context_module_items.csv +0 -0
- data/spec/support/fixtures/reports/context_modules.csv +3 -3
- data/spec/support/fixtures/reports/course_nicknames.csv +0 -0
- data/spec/support/fixtures/reports/course_progresses.csv +3 -0
- data/spec/support/fixtures/reports/course_progresses_conflict.csv +2 -0
- data/spec/support/fixtures/reports/courses.csv +0 -0
- data/spec/support/fixtures/reports/enrollments.csv +0 -0
- data/spec/support/fixtures/reports/grading_period_groups.csv +0 -0
- data/spec/support/fixtures/reports/grading_periods.csv +0 -0
- data/spec/support/fixtures/reports/group_memberships.csv +0 -0
- data/spec/support/fixtures/reports/groups.csv +0 -0
- data/spec/support/fixtures/reports/learning_outcome_results.csv +0 -0
- data/spec/support/fixtures/reports/learning_outcomes.csv +0 -0
- data/spec/support/fixtures/reports/provisioning_csv +0 -0
- data/spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv +0 -0
- data/spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv +0 -0
- data/spec/support/fixtures/reports/rubric_assessments.csv +0 -0
- data/spec/support/fixtures/reports/rubric_associations.csv +0 -0
- data/spec/support/fixtures/reports/rubrics.csv +0 -0
- data/spec/support/fixtures/reports/sections.csv +0 -0
- data/spec/support/fixtures/reports/submissions.csv +0 -0
- data/spec/support/fixtures/reports/user_observers.csv +0 -0
- data/spec/support/fixtures/reports/users.csv +0 -0
- data/spec/support/fixtures/reports/xlist.csv +0 -0
- metadata +202 -188
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fbc16dd889dae43881098a80d91c68ec64412b1ce872b51f176f89a0d2ce8fe
|
4
|
+
data.tar.gz: f202ff4cae0337f6a34872654b55371b5fdfabdccd1358fc7fceb14397549425
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35c21c3717c63c372fd840b511b2b51161f1114b4e9f8a8140d38ee0d4ca6393950d842b9619ded9731ae32b0abda8ef147ceaacba76f8bcc77d5b6966898b9f
|
7
|
+
data.tar.gz: a1b9a4f2129f9f441786237ed2bc69ff58009343d67d74f5724376f2fc77c0797fd3f932ea404d6b993d26ba210beeeafc1a9b0ad1025ad11169ebf7767f84af
|
data/README.md
CHANGED
@@ -242,6 +242,11 @@ class User < ApplicationRecord
|
|
242
242
|
# If the column name on the report and in the DB are the same, a shorthand can be used:
|
243
243
|
link_column :omit_from_final_grade, type: :datetime
|
244
244
|
|
245
|
+
# You can specify a block to pre-transform the value
|
246
|
+
link_column :column_in_report => :column_in_database do |value, row|
|
247
|
+
YAML.parse(value)
|
248
|
+
end
|
249
|
+
|
245
250
|
# If the defaults define a column you don't want synced, you can remove it from the mapping:
|
246
251
|
unlink_column :column_in_database
|
247
252
|
end
|
data/Rakefile
CHANGED
File without changes
|
File without changes
|
File without changes
|
@@ -3,7 +3,11 @@ module CanvasSync
|
|
3
3
|
#
|
4
4
|
# Use this model to track failures, job run times, and metadata about a job.
|
5
5
|
class JobLog < ApplicationRecord
|
6
|
-
|
6
|
+
if Rails.version > '7.0'
|
7
|
+
serialize :job_arguments, type: Array
|
8
|
+
else
|
9
|
+
serialize :job_arguments, Array
|
10
|
+
end
|
7
11
|
|
8
12
|
ERROR_STATUS = "error".freeze
|
9
13
|
SUCCESS_STATUS = "success".freeze
|
File without changes
|
data/config/routes.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/canvas_sync/config.rb
CHANGED
File without changes
|
data/lib/canvas_sync/engine.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# <%= autogenerated_migration_warning %>
|
2
|
+
|
3
|
+
class CreateCourseProgresses < ActiveRecord::Migration[5.1]
|
4
|
+
def change
|
5
|
+
create_table :course_progresses do |t|
|
6
|
+
t.bigint :canvas_course_id, null: false
|
7
|
+
t.bigint :canvas_user_id, null: false
|
8
|
+
t.integer :requirement_count
|
9
|
+
t.integer :requirement_completed_count
|
10
|
+
t.datetime :completion_date
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
|
15
|
+
add_index :course_progresses, :canvas_user_id
|
16
|
+
add_index :course_progresses, :canvas_course_id
|
17
|
+
add_index :course_progresses, [:canvas_user_id, :canvas_course_id], unique: true
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -14,8 +14,42 @@ class ContextModule < ApplicationRecord
|
|
14
14
|
has_many :context_module_items, primary_key: :canvas_id, foreign_key: :canvas_context_module_id
|
15
15
|
has_many :assignments, through: :context_module_items
|
16
16
|
|
17
|
+
serialize :completion_requirements
|
18
|
+
serialize :prerequisites
|
19
|
+
|
17
20
|
api_syncable({
|
18
|
-
|
19
|
-
|
21
|
+
canvas_id: :id,
|
22
|
+
canvas_context_id: :context_id,
|
23
|
+
canvas_context_type: :context_type,
|
24
|
+
position: :position,
|
25
|
+
name: :name,
|
26
|
+
workflow_state: :workflow_state,
|
27
|
+
unlock_at: :unlock_at,
|
28
|
+
completion_requirements: :completion_requirements,
|
29
|
+
prerequisites: :prerequisites,
|
30
|
+
requirement_count: :requirement_count
|
31
|
+
}, lambda { |api|
|
32
|
+
course_modules = api.course_modules(canvas_context_id, { include: ['items'] }) # avoids having 2 API calls for modules as we reuse this data
|
33
|
+
context_module = course_modules&.detect { |course_module| course_module['id'] == canvas_id }
|
34
|
+
|
35
|
+
if context_module.nil? # no context_module here means it is deleted in Canvas
|
36
|
+
self.workflow_state = :deleted
|
37
|
+
return self
|
38
|
+
end
|
39
|
+
|
40
|
+
# The ContextModule model in Canvas has the 'completion_requirements' and 'prerequisites' fields that are not returned directly from the API
|
41
|
+
# We need to compute them here based on data that we receive from course_modules in the API
|
42
|
+
context_module['prerequisites'] = course_modules.map do |course_module|
|
43
|
+
next unless context_module['prerequisite_module_ids']&.include?(course_module['id'])
|
44
|
+
|
45
|
+
{
|
46
|
+
id: course_module['id'],
|
47
|
+
name: course_module['name'],
|
48
|
+
type: 'context_module'
|
49
|
+
}.with_indifferent_access
|
50
|
+
end.compact
|
20
51
|
|
52
|
+
context_module['completion_requirements'] = context_module['items']&.map { |item| item['completion_requirement'] }&.compact
|
53
|
+
context_module
|
54
|
+
})
|
21
55
|
end
|
@@ -12,7 +12,15 @@ class ContextModuleItem < ApplicationRecord
|
|
12
12
|
belongs_to :assignment, foreign_key: :canvas_assignment_id, primary_key: :canvas_id
|
13
13
|
|
14
14
|
api_syncable({
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
canvas_id: :id,
|
16
|
+
canvas_context_module_id: :module_id,
|
17
|
+
position: :position,
|
18
|
+
canvas_content_type: :type,
|
19
|
+
canvas_content_id: :content_id,
|
20
|
+
canvas_assignment_id: :assignment_id
|
21
|
+
}, lambda { |api|
|
22
|
+
module_item = api.module_item(context_module.context.canvas_id, context_module.canvas_id, canvas_id)
|
23
|
+
module_item['assignment_id'] = api.assignment(context_module.context.canvas_id, module_item['content_id'])['id'] if module_item['type'] == 'Assignment'
|
24
|
+
module_item
|
25
|
+
})
|
18
26
|
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# <%= autogenerated_model_warning %>
|
2
|
+
|
3
|
+
# CourseProgress is not a Canvas model. It is a table built from the Custom Report
|
4
|
+
class CourseProgress < ApplicationRecord
|
5
|
+
include CanvasSync::Record
|
6
|
+
|
7
|
+
canvas_sync_features :defaults
|
8
|
+
|
9
|
+
belongs_to :user, primary_key: :canvas_id, foreign_key: :canvas_user_id, optional: true
|
10
|
+
belongs_to :course, primary_key: :canvas_id, foreign_key: :canvas_course_id, optional: true
|
11
|
+
|
12
|
+
validates_presence_of :canvas_user_id, :canvas_course_id
|
13
|
+
validates_uniqueness_of :canvas_user_id, scope: :canvas_course_id
|
14
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -53,6 +53,9 @@ module CanvasSync
|
|
53
53
|
# TODO: add some timezone config to the mapping.
|
54
54
|
# In cases where the timestamp or date doesn't include a timezone, you should be able to specify one
|
55
55
|
value = DateTime.parse(value).utc rescue nil # rubocop:disable Style/RescueModifier
|
56
|
+
elsif col_def[:type].to_sym == :yaml
|
57
|
+
# CSV parse from reading the report escapes the new lines and YAML throws an error with double backslashes
|
58
|
+
value = YAML.load(value.gsub("\\n", "\n")) rescue nil # rubocop:disable Style/RescueModifier
|
56
59
|
end
|
57
60
|
end
|
58
61
|
|
File without changes
|
data/lib/canvas_sync/job.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
@@ -4,7 +4,9 @@ module CanvasSync::JobBatches
|
|
4
4
|
|
5
5
|
attr_reader :base_job
|
6
6
|
|
7
|
-
def initialize(base_type = SerialBatchJob)
|
7
|
+
def initialize(base_type = SerialBatchJob, chain_id: nil)
|
8
|
+
@chain_id = chain_id || SecureRandom.urlsafe_base64(10)
|
9
|
+
|
8
10
|
if base_type.is_a?(Hash)
|
9
11
|
@base_job = base_type
|
10
12
|
@base_job[:args] ||= @base_job[:parameters] || []
|
@@ -109,7 +111,7 @@ module CanvasSync::JobBatches
|
|
109
111
|
return nil if matching_jobs.count == 0
|
110
112
|
|
111
113
|
job = matching_jobs[0][0]
|
112
|
-
job = self.class.new(job) unless job.is_a?(ChainBuilder)
|
114
|
+
job = self.class.new(job, chain_id: @chain_id) unless job.is_a?(ChainBuilder)
|
113
115
|
job
|
114
116
|
end
|
115
117
|
|
@@ -118,6 +120,7 @@ module CanvasSync::JobBatches
|
|
118
120
|
job_def.normalize!
|
119
121
|
else
|
120
122
|
job_def[:job] = job_def[:job].to_s
|
123
|
+
job_def[:chain_link] ||= "#{@chain_id}-#{SecureRandom.urlsafe_base64(10)}"
|
121
124
|
if (chain = self.class.get_chain_parameter(job_def, raise_error: false)).present?
|
122
125
|
chain.map! { |sub_job| normalize!(sub_job) }
|
123
126
|
end
|
@@ -138,7 +141,7 @@ module CanvasSync::JobBatches
|
|
138
141
|
args: args,
|
139
142
|
kwargs: kwargs,
|
140
143
|
}
|
141
|
-
self.class.new(hsh).apply_block(&blk) if blk.present?
|
144
|
+
self.class.new(hsh, chain_id: @chain_id).apply_block(&blk) if blk.present?
|
142
145
|
hsh
|
143
146
|
end
|
144
147
|
|
@@ -239,6 +242,24 @@ module CanvasSync::JobBatches
|
|
239
242
|
job_class.perform_later(*job_args, **job_kwargs)
|
240
243
|
end
|
241
244
|
end
|
245
|
+
|
246
|
+
def link_to_batch!(chain_link, batch)
|
247
|
+
# Or make chains a separate entity - Chains show batches, but batches don't show chain?
|
248
|
+
# Or "Annotate" a Batch with chain data - could extract chain id from any job entry
|
249
|
+
end
|
250
|
+
|
251
|
+
def annotate_batch!(batch, chain)
|
252
|
+
|
253
|
+
end
|
254
|
+
|
255
|
+
def handle_step_complete(status, opts)
|
256
|
+
chain_link = opts[:chain_link]
|
257
|
+
chain_id, chain_step_id = chain_link.split('-')
|
258
|
+
|
259
|
+
CanvasSync::JobBatches::Batch.redis.multi do |r|
|
260
|
+
r.hset("CHAIN-#{chain_id}-steps", chain_step_id, "complete")
|
261
|
+
end
|
262
|
+
end
|
242
263
|
end
|
243
264
|
end
|
244
265
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -144,6 +144,10 @@ module CanvasSync::JobBatches
|
|
144
144
|
if next_job[:chain_link].present?
|
145
145
|
# Annotate Batch with chain-step info
|
146
146
|
batch.context["csb:chain_link"] = next_job[:chain_link]
|
147
|
+
# TODO Add Fiber Batch to chain-link
|
148
|
+
# With the exception of the top of the Chain, all nested ManagedBatch Roots should be within a Fiber,
|
149
|
+
# so we shouldn't really need to make the Root checkin with the chain
|
150
|
+
# ...except to cleanup the chain
|
147
151
|
batch.on(:complete, "#{ChainBuilder.to_s}.chain_step_complete", chain_link: next_job[:chain_link])
|
148
152
|
end
|
149
153
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -6,8 +6,6 @@ module CanvasSync::JobUniqueness
|
|
6
6
|
context_class.new(data, **kwargs)
|
7
7
|
end
|
8
8
|
|
9
|
-
attr_reader :lock_id
|
10
|
-
|
11
9
|
# { job_clazz, jid, queue, args?, kwargs?, base_key? }
|
12
10
|
def initialize(data, job_instance: nil, config: nil)
|
13
11
|
@base_key = data[:base_key]
|
@@ -16,7 +14,9 @@ module CanvasSync::JobUniqueness
|
|
16
14
|
@config = config || @context_data[:config]
|
17
15
|
|
18
16
|
# TODO Consider (somewhere) updating the lock_id to the BID of the wrapping Batch (when applicable)
|
19
|
-
@lock_id ||= data[:lid] || Thread.current[:unique_jobs_previous_context]&.lock_id
|
17
|
+
@lock_id ||= data[:lid] || Thread.current[:unique_jobs_previous_context]&.lock_id
|
18
|
+
@lock_id_locked = @lock_id.present?
|
19
|
+
@lock_id ||= job_id
|
20
20
|
end
|
21
21
|
|
22
22
|
# This is primarily for rehydrating in a Batch Callback, so it is unlikely that args and kwargs are needed.
|
@@ -84,6 +84,18 @@ module CanvasSync::JobUniqueness
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
+
def lock_id
|
88
|
+
@lock_id_locked = true
|
89
|
+
@lock_id
|
90
|
+
end
|
91
|
+
|
92
|
+
def lock_id=(new_id)
|
93
|
+
raise "Lock ID already set" if @lock_id_locked
|
94
|
+
return unless new_id.present?
|
95
|
+
@lock_id = new_id
|
96
|
+
@lock_id_locked = true
|
97
|
+
end
|
98
|
+
|
87
99
|
def job_id
|
88
100
|
@context_data[:jid]
|
89
101
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|