Class: ProjectJobService
- Inherits:
-
Object
- Object
- ProjectJobService
- Defined in:
- app/services/project_job_service.rb
Instance Method Summary collapse
-
#initialize(project:) ⇒ ProjectJobService
constructor
A new instance of ProjectJobService.
- #list_contents_job(user:) ⇒ Object
Constructor Details
#initialize(project:) ⇒ ProjectJobService
Returns a new instance of ProjectJobService.
4 5 6 |
# File 'app/services/project_job_service.rb', line 4 def initialize(project:) @project = project end |
Instance Method Details
#list_contents_job(user:) ⇒ Object
8 9 10 11 12 13 |
# File 'app/services/project_job_service.rb', line 8 def list_contents_job(user:) job = FileInventoryJob.perform_later(user_id: user.id, project_id: @project.id, mediaflux_session: user.mediaflux_session) # Log the job id and the Sidekiq JID in case we need to troubleshoot the job # https://github.com/sidekiq/sidekiq/wiki/Active-Job#job-id Rails.logger.info("Job scheduled, job id: #{job.job_id}, (Sidekiq JID: #{job.provider_job_id || 'nil'})") end |