File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
lib/cloud_controller/packager Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,9 @@ def create_fresh
165165 unprocessable_non_bits_package!
166166 end
167167
168- PackageCreate . create ( message :, user_audit_info :)
168+ package = PackageCreate . create ( message :, user_audit_info :)
169+ BitsExpiration . new . expire_packages! ( app )
170+ package
169171 end
170172
171173 def create_copy
@@ -182,11 +184,13 @@ def create_copy
182184 unauthorized! unless permission_queryer . can_write_to_active_space? ( source_package . space . id )
183185 suspended! unless permission_queryer . is_space_active? ( source_package . space . id )
184186
185- PackageCopy . new . copy (
187+ package = PackageCopy . new . copy (
186188 destination_app_guid : app_guid ,
187189 source_package : source_package ,
188190 user_audit_info : user_audit_info
189191 )
192+ BitsExpiration . new . expire_packages! ( destination_app )
193+ package
190194 end
191195
192196 def package_not_found!
Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ def pack
2121 end
2222
2323 package . succeed_upload! ( checksums )
24-
25- VCAP ::CloudController ::BitsExpiration . new . expire_packages! ( package . app )
2624 ensure
2725 FileUtils . rm_f ( @uploaded_files_path ) if @uploaded_files_path
2826 end
You can’t perform that action at this time.
0 commit comments