Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Adds a log entry on FilesInfoQuery

Marcello Rocha2a9b43d7a558
diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_info_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_info_query.rb
index dd7fa8ac98b..25faa2fa58c 100644
--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_info_query.rb
+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_info_query.rb
@@ -56,6 +56,7 @@ module Storages
return ServiceResult.success(result: [])
end
+ info "Retrieving file information for #{file_ids.join(', ')}"
http_options = Util.ocs_api_request.deep_merge(Util.accept_json)
Authentication[auth_strategy].call(storage: @storage, http_options:) do |http|
parsed_response = files_info(http, file_ids).on_failure { return _1 }.result
diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/files_info_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/files_info_query.rb
index 939027ac752..d1d7a998214 100644
--- a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/files_info_query.rb
+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/files_info_query.rb
@@ -52,17 +52,20 @@ module Storages
)
end
- result = Array(file_ids).map do |file_id|
- file_info_result = FileInfoQuery.call(storage: @storage, auth_strategy:, file_id:)
+ with_tagged_logger do
+ info "Retrieving file information for #{file_ids.join(', ')}"
+ result = Array(file_ids).map do |file_id|
+ file_info_result = FileInfoQuery.call(storage: @storage, auth_strategy:, file_id:)
- file_info_result.on_failure do |failed_result|
- return failed_result if failed_result.error_source.module_parent == AuthenticationStrategies
+ file_info_result.on_failure do |failed_result|
+ return failed_result if failed_result.error_source.module_parent == AuthenticationStrategies
+ end
+
+ wrap_storage_file_error(file_id, file_info_result)
end
- wrap_storage_file_error(file_id, file_info_result)
+ ServiceResult.success(result:)
end
-
- ServiceResult.success(result:)
end
private