144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
# File 'lib/openc3/models/target_model.rb', line 144
def self.delete_modified(name, scope:)
rubys3_client = Aws::S3::Client.new
token = nil
while true
resp = rubys3_client.list_objects_v2({
bucket: 'config',
max_keys: 1000,
prefix: "#{scope}/targets_modified/#{name}/",
continuation_token: token
})
resp.contents.each do |item|
rubys3_client.delete_object(bucket: 'config', key: item.key)
end
break unless resp.is_truncated
token = resp.next_continuation_token
end
end
|