Class: ImportExportCleanUpService

Inherits:
Object
  • Object
show all
Defined in:
app/services/import_export_clean_up_service.rb

Constant Summary collapse

LAST_MODIFIED_TIME_IN_MINUTES =
1440
DIR_DEPTH =
5

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mmin = LAST_MODIFIED_TIME_IN_MINUTES) ⇒ ImportExportCleanUpService

Returns a new instance of ImportExportCleanUpService.



9
10
11
12
# File 'app/services/import_export_clean_up_service.rb', line 9

def initialize(mmin = LAST_MODIFIED_TIME_IN_MINUTES)
  @mmin = mmin
  @path = Gitlab::ImportExport.storage_path
end

Instance Attribute Details

#mminObject (readonly)

Returns the value of attribute mmin.



7
8
9
# File 'app/services/import_export_clean_up_service.rb', line 7

def mmin
  @mmin
end

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'app/services/import_export_clean_up_service.rb', line 7

def path
  @path
end

Instance Method Details

#executeObject



14
15
16
17
18
# File 'app/services/import_export_clean_up_service.rb', line 14

def execute
  Gitlab::Metrics.measure(:import_export_clean_up) do
    execute_cleanup
  end
end