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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mmin = LAST_MODIFIED_TIME_IN_MINUTES) ⇒ ImportExportCleanUpService

Returns a new instance of ImportExportCleanUpService.


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

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


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

def mmin
  @mmin
end

#pathObject (readonly)

Returns the value of attribute path


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

def path
  @path
end

Instance Method Details

#executeObject


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

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