Skip to content

Commit

Permalink
fix undefined naming error
Browse files Browse the repository at this point in the history
  • Loading branch information
o-orand committed Oct 3, 2024
1 parent 3eb1058 commit 20d1927
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/mongodb_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def create_collection(collection_name, require_collection = true)
begin
client = Mongo::Client.new(uri)
client[collection_name].create
# rescue Mongo::ConnectionFailure
# app.bind_mongodb_service_to_app_instructions
rescue Mongo::Error::OperationFailure
app.bind_mongodb_service_to_app_instructions
ensure
client.close if client
end
Expand All @@ -28,8 +28,8 @@ def drop_collection(collection_name, require_collection = true)
begin
client = Mongo::Client.new(uri)
client[collection_name].drop
# rescue Mongo::ConnectionFailure
# app.bind_mongodb_service_to_app_instructions
rescue Mongo::Error::OperationFailure
app.bind_mongodb_service_to_app_instructions
ensure
client.close if client
end
Expand Down

0 comments on commit 20d1927

Please sign in to comment.