Class: Environments::ScheduleToDeleteReviewAppsService

Inherits:
BaseService
  • Object
show all
Includes:
Gitlab::ExclusiveLeaseHelpers
Defined in:
app/services/environments/schedule_to_delete_review_apps_service.rb

Defined Under Namespace

Classes: Result

Constant Summary collapse

EXCLUSIVE_LOCK_KEY_BASE =
'environments:delete_review_apps:lock'
LOCK_TIMEOUT =
2.minutes

Constants included from Gitlab::ExclusiveLeaseHelpers

Gitlab::ExclusiveLeaseHelpers::FailedToObtainLockError

Instance Attribute Summary

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods included from Gitlab::ExclusiveLeaseHelpers

#in_lock

Methods inherited from BaseService

#initialize

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

#can?

Constructor Details

This class inherits a constructor from BaseService

Instance Method Details

#executeObject



10
11
12
13
14
15
16
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 10

def execute
  if validation_error = validate
    return validation_error
  end

  mark_deletable_environments
end