Class: Projects::LfsPointers::LfsLinkService
- Inherits:
-
BaseService
- Object
- BaseService
- Projects::LfsPointers::LfsLinkService
- Defined in:
- app/services/projects/lfs_pointers/lfs_link_service.rb
Constant Summary collapse
- TooManyOidsError =
Class.new(StandardError)
- MAX_OIDS =
100_000
- BATCH_SIZE =
1000
Instance Attribute Summary
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
-
#execute(oids) ⇒ Object
Accept an array of oids to link.
Methods inherited from BaseService
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
This class inherits a constructor from BaseService
Instance Method Details
#execute(oids) ⇒ Object
Accept an array of oids to link
Returns an array with the oid of the existent lfs objects
15 16 17 18 19 20 21 22 23 24 |
# File 'app/services/projects/lfs_pointers/lfs_link_service.rb', line 15 def execute(oids) return [] unless project&.lfs_enabled? validate!(oids) yield if block_given? # Search and link existing LFS Object link_existing_lfs_objects(oids) end |