254
255
256
257
258
259
260
261
262
263
264
|
# File 'lib/openc3/models/microservice_model.rb', line 254
def undeploy
prefix = "#{@scope}/microservices/#{@name}/"
@bucket.list_objects(bucket: ENV['OPENC3_CONFIG_BUCKET'], prefix: prefix).each do |object|
@bucket.delete_object(bucket: ENV['OPENC3_CONFIG_BUCKET'], key: object.key)
end
config = { kind: 'deleted', type: 'microservice', name: @name }
config[:plugin] = @plugin if @plugin
ConfigTopic.write(config, scope: @scope)
rescue Exception => error
Logger.error("Error undeploying microservice model #{@name} in scope #{@scope} due to #{error}")
end
|