aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranskor <anskor@yandex-team.ru>2022-02-10 16:50:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:18 +0300
commitc3356aebb686e7128a19f75ef61d57388131f12f (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8
parentdbfc9d8546687ce31ffd112c6c2d2f14be1bb4f0 (diff)
downloadydb-c3356aebb686e7128a19f75ef61d57388131f12f.tar.gz
Restoring authorship annotation for <anskor@yandex-team.ru>. Commit 2 of 2.
-rw-r--r--library/cpp/mime/types/mime.cpp12
-rw-r--r--library/cpp/mime/types/mime.h6
-rw-r--r--library/cpp/retry/protos/retry_options.proto18
-rw-r--r--library/cpp/retry/protos/ya.make28
-rw-r--r--library/cpp/retry/retry.cpp16
-rw-r--r--library/cpp/retry/retry.h6
-rw-r--r--library/cpp/retry/retry_ut.cpp30
-rw-r--r--library/cpp/retry/ya.make6
8 files changed, 61 insertions, 61 deletions
diff --git a/library/cpp/mime/types/mime.cpp b/library/cpp/mime/types/mime.cpp
index d6d3334bd3..706d776b24 100644
--- a/library/cpp/mime/types/mime.cpp
+++ b/library/cpp/mime/types/mime.cpp
@@ -91,9 +91,9 @@ const TMimeTypes::TRecord TMimeTypes::Records[] = {
{MIME_DJVU, "image/vnd.djvu\0image/x-djvu\0", "djvu\0djv\0"},
{MIME_CHM, "application/x-chm\0application/vnd.ms-htmlhelp\0", "chm\0"},
{MIME_FB2ZIP, "application/zip\0", "fb2zip\0"},
- {MIME_IMAGE_TIFF, "image/tiff\0image/tiff-fx\0", "tif\0tiff\0"},
- {MIME_IMAGE_PNM, "image/x-portable-anymap\0", "pnm\0pgm\0ppm\0pbm\0"},
- {MIME_IMAGE_SVG, "image/svg+xml\0", "svg\0"},
+ {MIME_IMAGE_TIFF, "image/tiff\0image/tiff-fx\0", "tif\0tiff\0"},
+ {MIME_IMAGE_PNM, "image/x-portable-anymap\0", "pnm\0pgm\0ppm\0pbm\0"},
+ {MIME_IMAGE_SVG, "image/svg+xml\0", "svg\0"},
{MIME_IMAGE_ICON, "image/x-icon\0image/vnd.microsoft.icon\0", "ico\0"},
{MIME_WOFF, "font/woff\0", "woff\0"},
{MIME_WOFF2, "font/woff2\0", "woff2\0"},
@@ -242,9 +242,9 @@ const char* MimeNames[MIME_MAX] = {
"djvu", // MIME_DJVU // 36
"chm", // MIME_CHM // 37
"fb2zip", // MIME_FB2ZIP // 38
- "tiff", // MIME_IMAGE_TIFF // 39
- "pnm", // MIME_IMAGE_PNM // 40
- "svg", // MIME_IMAGE_SVG // 41
+ "tiff", // MIME_IMAGE_TIFF // 39
+ "pnm", // MIME_IMAGE_PNM // 40
+ "svg", // MIME_IMAGE_SVG // 41
"ico", // MIME_IMAGE_ICON // 42
"woff", // MIME_WOFF // 43
"woff2", // MIME_WOFF2 // 44
diff --git a/library/cpp/mime/types/mime.h b/library/cpp/mime/types/mime.h
index 71c87c4e3d..05da389ea9 100644
--- a/library/cpp/mime/types/mime.h
+++ b/library/cpp/mime/types/mime.h
@@ -50,9 +50,9 @@ enum MimeTypes {
MIME_DJVU = 36,
MIME_CHM = 37,
MIME_FB2ZIP = 38,
- MIME_IMAGE_TIFF = 39,
- MIME_IMAGE_PNM = 40,
- MIME_IMAGE_SVG = 41,
+ MIME_IMAGE_TIFF = 39,
+ MIME_IMAGE_PNM = 40,
+ MIME_IMAGE_SVG = 41,
MIME_IMAGE_ICON = 42,
MIME_WOFF = 43,
MIME_WOFF2 = 44,
diff --git a/library/cpp/retry/protos/retry_options.proto b/library/cpp/retry/protos/retry_options.proto
index 1edf34df2e..063fff0141 100644
--- a/library/cpp/retry/protos/retry_options.proto
+++ b/library/cpp/retry/protos/retry_options.proto
@@ -1,9 +1,9 @@
-package NRetry;
-
-message TRetryOptionsPB {
- optional uint32 MaxTries = 1 [default = 5];
- optional uint32 InitialSleepMs = 2 [default = 0];
- optional uint32 SleepIncrementMs = 3 [default = 0];
- optional uint32 RandomDeltaMs = 4 [default = 10];
- optional uint32 ExponentalMultiplierMs = 5 [default = 100];
-}
+package NRetry;
+
+message TRetryOptionsPB {
+ optional uint32 MaxTries = 1 [default = 5];
+ optional uint32 InitialSleepMs = 2 [default = 0];
+ optional uint32 SleepIncrementMs = 3 [default = 0];
+ optional uint32 RandomDeltaMs = 4 [default = 10];
+ optional uint32 ExponentalMultiplierMs = 5 [default = 100];
+}
diff --git a/library/cpp/retry/protos/ya.make b/library/cpp/retry/protos/ya.make
index 6a8f99ac67..ad8ea2086a 100644
--- a/library/cpp/retry/protos/ya.make
+++ b/library/cpp/retry/protos/ya.make
@@ -1,16 +1,16 @@
-PROTO_LIBRARY()
-
-OWNER(
- anskor
-)
-
-SRCS(
- retry_options.proto
-)
-
-PEERDIR()
-
+PROTO_LIBRARY()
+
+OWNER(
+ anskor
+)
+
+SRCS(
+ retry_options.proto
+)
+
+PEERDIR()
+
EXCLUDE_TAGS(GO_PROTO)
-END()
-
+END()
+
diff --git a/library/cpp/retry/retry.cpp b/library/cpp/retry/retry.cpp
index dee8b15730..92466cdeca 100644
--- a/library/cpp/retry/retry.cpp
+++ b/library/cpp/retry/retry.cpp
@@ -16,11 +16,11 @@ bool DoWithRetryOnRetCode(std::function<bool()> func, TRetryOptions retryOptions
}
return false;
}
-
-TRetryOptions MakeRetryOptions(const NRetry::TRetryOptionsPB& retryOptions) {
- return TRetryOptions(retryOptions.GetMaxTries(),
- TDuration::MilliSeconds(retryOptions.GetInitialSleepMs()),
- TDuration::MilliSeconds(retryOptions.GetRandomDeltaMs()),
- TDuration::MilliSeconds(retryOptions.GetSleepIncrementMs()),
- TDuration::MilliSeconds(retryOptions.GetExponentalMultiplierMs()));
-}
+
+TRetryOptions MakeRetryOptions(const NRetry::TRetryOptionsPB& retryOptions) {
+ return TRetryOptions(retryOptions.GetMaxTries(),
+ TDuration::MilliSeconds(retryOptions.GetInitialSleepMs()),
+ TDuration::MilliSeconds(retryOptions.GetRandomDeltaMs()),
+ TDuration::MilliSeconds(retryOptions.GetSleepIncrementMs()),
+ TDuration::MilliSeconds(retryOptions.GetExponentalMultiplierMs()));
+}
diff --git a/library/cpp/retry/retry.h b/library/cpp/retry/retry.h
index fd87dcbf88..c47ff5070f 100644
--- a/library/cpp/retry/retry.h
+++ b/library/cpp/retry/retry.h
@@ -3,7 +3,7 @@
#include "utils.h"
#include <library/cpp/retry/protos/retry_options.pb.h>
-
+
#include <util/datetime/base.h>
#include <util/generic/maybe.h>
#include <util/generic/typetraits.h>
@@ -129,5 +129,5 @@ void DoWithRetry(std::function<void()> func, TRetryOptions retryOptions);
bool DoWithRetryOnRetCode(std::function<bool()> func, TRetryOptions retryOptions);
Y_DECLARE_PODTYPE(TRetryOptions);
-
-TRetryOptions MakeRetryOptions(const NRetry::TRetryOptionsPB& retryOptions);
+
+TRetryOptions MakeRetryOptions(const NRetry::TRetryOptionsPB& retryOptions);
diff --git a/library/cpp/retry/retry_ut.cpp b/library/cpp/retry/retry_ut.cpp
index 4144746af9..92153e987e 100644
--- a/library/cpp/retry/retry_ut.cpp
+++ b/library/cpp/retry/retry_ut.cpp
@@ -99,19 +99,19 @@ Y_UNIT_TEST_SUITE(Retry) {
Y_UNIT_TEST(RetryOnRetCodeFail) {
UNIT_ASSERT(false == DoWithRetryOnRetCode(TDoOnSecondOrFail{}, TRetryOptions(0, TDuration::Zero())));
}
- Y_UNIT_TEST(MakeRetryOptionsFromProto) {
- NRetry::TRetryOptionsPB protoOptions;
- protoOptions.SetMaxTries(1);
- protoOptions.SetInitialSleepMs(2);
- protoOptions.SetSleepIncrementMs(3);
- protoOptions.SetRandomDeltaMs(4);
- protoOptions.SetExponentalMultiplierMs(5);
-
- const TRetryOptions options = MakeRetryOptions(protoOptions);
- UNIT_ASSERT_EQUAL(options.RetryCount, 1);
- UNIT_ASSERT_EQUAL(options.SleepDuration, TDuration::MilliSeconds(2));
- UNIT_ASSERT_EQUAL(options.SleepIncrement, TDuration::MilliSeconds(3));
- UNIT_ASSERT_EQUAL(options.SleepRandomDelta, TDuration::MilliSeconds(4));
- UNIT_ASSERT_EQUAL(options.SleepExponentialMultiplier, TDuration::MilliSeconds(5));
- }
+ Y_UNIT_TEST(MakeRetryOptionsFromProto) {
+ NRetry::TRetryOptionsPB protoOptions;
+ protoOptions.SetMaxTries(1);
+ protoOptions.SetInitialSleepMs(2);
+ protoOptions.SetSleepIncrementMs(3);
+ protoOptions.SetRandomDeltaMs(4);
+ protoOptions.SetExponentalMultiplierMs(5);
+
+ const TRetryOptions options = MakeRetryOptions(protoOptions);
+ UNIT_ASSERT_EQUAL(options.RetryCount, 1);
+ UNIT_ASSERT_EQUAL(options.SleepDuration, TDuration::MilliSeconds(2));
+ UNIT_ASSERT_EQUAL(options.SleepIncrement, TDuration::MilliSeconds(3));
+ UNIT_ASSERT_EQUAL(options.SleepRandomDelta, TDuration::MilliSeconds(4));
+ UNIT_ASSERT_EQUAL(options.SleepExponentialMultiplier, TDuration::MilliSeconds(5));
+ }
}
diff --git a/library/cpp/retry/ya.make b/library/cpp/retry/ya.make
index bded887703..31e0c6a259 100644
--- a/library/cpp/retry/ya.make
+++ b/library/cpp/retry/ya.make
@@ -10,8 +10,8 @@ SRCS(
utils.cpp
)
-PEERDIR(
+PEERDIR(
library/cpp/retry/protos
-)
-
+)
+
END()