修复:id为nil报错

This commit is contained in:
yystopf 2024-06-24 21:00:33 +08:00
parent 90f992a1c0
commit a6868e8b12
1 changed files with 1 additions and 0 deletions

View File

@ -2,6 +2,7 @@ class CacheAsyncClearJob < ApplicationJob
queue_as :cache queue_as :cache
def perform(type, id=nil) def perform(type, id=nil)
return if id.nil?
case type case type
when "project_common_service" when "project_common_service"
Cache::V2::ProjectCommonService.new(id).clear Cache::V2::ProjectCommonService.new(id).clear