Module: Gitlab::BitbucketImport::ParallelScheduling
- Includes:
- ErrorTracking, Loggable
- Included in:
- Importers::IssuesImporter, Importers::PullRequestsImporter
- Defined in:
- lib/gitlab/bitbucket_import/parallel_scheduling.rb
Constant Summary collapse
- ALREADY_ENQUEUED_CACHE_KEY =
The base cache key to use for tracking already enqueued objects.
'bitbucket-importer/already-enqueued/%{project}/%{collection}'
- JOB_WAITER_CACHE_KEY =
The base cache key to use for storing job waiter key
'bitbucket-importer/job-waiter/%{project}/%{collection}'
- BATCH_SIZE =
100
Instance Attribute Summary collapse
-
#already_enqueued_cache_key ⇒ Object
readonly
Returns the value of attribute already_enqueued_cache_key.
-
#job_waiter_cache_key ⇒ Object
readonly
Returns the value of attribute job_waiter_cache_key.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
-
#initialize(project) ⇒ Object
project - An instance of ‘Project`.
Methods included from ErrorTracking
Methods included from Loggable
#log_debug, #log_error, #log_info, #log_warn
Instance Attribute Details
#already_enqueued_cache_key ⇒ Object (readonly)
Returns the value of attribute already_enqueued_cache_key.
9 10 11 |
# File 'lib/gitlab/bitbucket_import/parallel_scheduling.rb', line 9 def already_enqueued_cache_key @already_enqueued_cache_key end |
#job_waiter_cache_key ⇒ Object (readonly)
Returns the value of attribute job_waiter_cache_key.
9 10 11 |
# File 'lib/gitlab/bitbucket_import/parallel_scheduling.rb', line 9 def job_waiter_cache_key @job_waiter_cache_key end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
9 10 11 |
# File 'lib/gitlab/bitbucket_import/parallel_scheduling.rb', line 9 def project @project end |
Instance Method Details
#initialize(project) ⇒ Object
project - An instance of ‘Project`.
22 23 24 25 26 27 28 29 |
# File 'lib/gitlab/bitbucket_import/parallel_scheduling.rb', line 22 def initialize(project) @project = project @already_enqueued_cache_key = format(ALREADY_ENQUEUED_CACHE_KEY, project: project.id, collection: collection_method) @job_waiter_cache_key = format(JOB_WAITER_CACHE_KEY, project: project.id, collection: collection_method) end |