1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-25 02:42:28 +02:00

Main build (Jenkins)

This commit is contained in:
Vitaly the Alpaca (bot) 2024-12-15 15:57:20 +03:00
parent 300b432c52
commit cdc4ea8d39
28 changed files with 5968 additions and 5950 deletions

View File

@ -5,7 +5,7 @@
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
DeliveryDate = CurrentDate + Day * 14;
WHile DayOfWeek(DeliveryDate) > 5 Do
While DayOfWeek(DeliveryDate) > 5 Do
DeliveryDate = DeliveryDate + Day;
EndDo;

View File

@ -2,7 +2,7 @@
WorkID = "AF1jdkYTLTYAAAAAAAAAAQ";
Status = "in_progress";
WHile Status = "in_progress" Do
While Status = "in_progress" Do
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
Status = Result[".tag"];

View File

@ -23,7 +23,7 @@
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

View File

@ -24,7 +24,7 @@
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

View File

@ -23,7 +23,7 @@
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

View File

@ -37,7 +37,7 @@ Method at API documentation: [Registration of delivery appointment](https://api-
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
DeliveryDate = CurrentDate + Day * 14;
WHile DayOfWeek(DeliveryDate) > 5 Do
While DayOfWeek(DeliveryDate) > 5 Do
DeliveryDate = DeliveryDate + Day;
EndDo;

View File

@ -30,7 +30,7 @@ import TabItem from '@theme/TabItem';
WorkID = "AF1jdkYTLTYAAAAAAAAAAQ";
Status = "in_progress";
WHile Status = "in_progress" Do
While Status = "in_progress" Do
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
Status = Result[".tag"];

View File

@ -60,7 +60,7 @@ This is a service method. A `PutObject` method is intended for the common scenar
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

View File

@ -59,7 +59,7 @@ This is a service method. A `PutObject` method is intended for the common scenar
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

View File

@ -63,7 +63,7 @@ Parameters with Binary data type can also accept file paths on disk and URLs
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

File diff suppressed because it is too large Load Diff

View File

@ -842,7 +842,7 @@ Function UploadLargeFile(Val Token, Val File, Val Path, Val Mode)
TotalSize = File.Size();
Session = OpenSession(Token);
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
Indent = CurrentPosition;
Cursor = New Structure("offset,session_id", Indent, Session);

View File

@ -640,7 +640,7 @@ Function UploadFileInParts(Val Binary, Val UploadURL)
DataReader = New DataReader(Binary);
SourceStream = DataReader.SourceStream();
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
BytesRead = SourceStream.CurrentPosition();
Result = DataReader.Read(ChunkSize);

View File

@ -565,6 +565,7 @@ Function PutObject(Val Name
If OPI_Tools.CollectionFieldExist(BasicData_, "ChunkSize") Then
MaxSize = BasicData_["ChunkSize"];
OPI_TypeConversion.GetNumber(MaxSize);
Else
MaxSize = 20971520;
EndIf;
@ -850,6 +851,7 @@ Function GetObject(Val Name
If OPI_Tools.CollectionFieldExist(BasicData_, "ChunkSize") Then
MaxSize = BasicData_["ChunkSize"];
OPI_TypeConversion.GetNumber(MaxSize);
Else
MaxSize = 20971520;
EndIf;
@ -1674,7 +1676,7 @@ Function GetObjectInChunks(Val BasicData
HeadersArray = New Array;
WHile ChunkStart < TotalSize - ChunkSize Do
While ChunkStart < TotalSize - ChunkSize Do
ChunkEnd = ChunkStart + ChunkSize - 1;
@ -1798,7 +1800,7 @@ Function UploadObjectInParts(Val Name
Attempts = 3;
LastSuccessCode = 299;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
For N = 1 To Attempts Do

View File

@ -441,7 +441,7 @@ Function WaitForProcessingCompletion(Val ProcessingStatus, Val InitializationID,
Fields.Insert(Command , "STATUS");
Fields.Insert("media_id", InitializationID);
WHile String(ProcessingStatus) = "pending" Or String(ProcessingStatus) = "in_progress" Do
While String(ProcessingStatus) = "pending" Or String(ProcessingStatus) = "in_progress" Do
Authorization = CreateAuthorizationHeaderV1(Parameters, Fields, "GET", URL);
Response = OPI_Tools.Get(URL, Fields, Authorization);

View File

@ -7346,7 +7346,7 @@ Procedure Dropbox_GetUploadStatusByURL(FunctionParameters)
WorkID = FunctionParameters["Dropbox_Job"];
Status = "in_progress";
WHile Status = "in_progress" Do
While Status = "in_progress" Do
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
Status = Result[".tag"];
@ -7708,7 +7708,7 @@ Procedure Dropbox_CancelFolderPublication(FunctionParameters)
CurrentStatus = "in_progress";
JobID = Result["async_job_id"];
WHile CurrentStatus = "in_progress" Do
While CurrentStatus = "in_progress" Do
Result = OPI_Dropbox.GetAsynchronousChangeStatus(Token, JobID);
CurrentStatus = Result[".tag"];
OPI_Tools.Pause(3);
@ -12963,7 +12963,7 @@ Procedure Ozon_GetProductCreationStatus(FunctionParameters)
OPI_TestDataRetrieval.WriteLog(Result, "GetProductCreationStatus", "Ozon");
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
@ -13002,7 +13002,7 @@ Procedure Ozon_CreateProductByOzonID(FunctionParameters)
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
@ -13068,7 +13068,7 @@ Procedure Ozon_UpdateProductsAttributes(FunctionParameters)
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
@ -13373,7 +13373,7 @@ Procedure Ozon_GetCodesUploadStatus(FunctionParameters)
OPI_TestDataRetrieval.WriteLog(Result, "GetCodesUploadStatus", "Ozon");
If ValueIsFilled(Result["result"]) Then
WHile Result["result"]["status"] = "pending" Do
While Result["result"]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetCodesUploadStatus(ClientID, APIKey, TaskID);
@ -14234,7 +14234,7 @@ Procedure CDEK_RegisterDeliveryAppointment(FunctionParameters)
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
DeliveryDate = CurrentDate + Day * 14;
WHile DayOfWeek(DeliveryDate) > 5 Do
While DayOfWeek(DeliveryDate) > 5 Do
DeliveryDate = DeliveryDate + Day;
EndDo;
@ -15388,7 +15388,7 @@ Procedure S3_InitPartsUpload(FunctionParameters)
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();
@ -15459,7 +15459,7 @@ Procedure S3_FinishPartsUpload(FunctionParameters)
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();
@ -15531,7 +15531,7 @@ Procedure S3_UploadObjectPart(FunctionParameters)
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

View File

@ -8013,7 +8013,7 @@ Procedure CLI_Dropbox_GetUploadStatusByURL(FunctionParameters)
WorkID = FunctionParameters["Dropbox_Job"];
Status = "in_progress";
WHile Status = "in_progress" Do
While Status = "in_progress" Do
Options = New Structure;
Options.Insert("token" , Token);
@ -8434,7 +8434,7 @@ Procedure CLI_Dropbox_CancelFolderPublication(FunctionParameters)
CurrentStatus = "in_progress";
JobID = Result["async_job_id"];
WHile CurrentStatus = "in_progress" Do
While CurrentStatus = "in_progress" Do
Options = New Structure;
Options.Insert("token" , Token);
@ -9509,7 +9509,7 @@ Procedure CLI_Ozon_GetProductCreationStatus(FunctionParameters)
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetProductCreationStatus", "Ozon");
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
@ -9555,7 +9555,7 @@ Procedure CLI_Ozon_CreateProductByOzonID(FunctionParameters)
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
@ -9623,7 +9623,7 @@ Procedure CLI_Ozon_UpdateProductsAttributes(FunctionParameters)
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
@ -9952,7 +9952,7 @@ Procedure CLI_Ozon_GetCodesUploadStatus(FunctionParameters)
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetCodesUploadStatus", "Ozon");
If ValueIsFilled(Result["result"]) Then
WHile Result["result"]["status"] = "pending" Do
While Result["result"]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetCodesUploadStatus", Options);
@ -16148,7 +16148,7 @@ Procedure CLI_CDEK_RegisterDeliveryAppointment(FunctionParameters)
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
DeliveryDate = CurrentDate + Day * 14;
WHile DayOfWeek(DeliveryDate) > 5 Do
While DayOfWeek(DeliveryDate) > 5 Do
DeliveryDate = DeliveryDate + Day;
EndDo;
@ -17688,7 +17688,7 @@ Procedure CLI_S3_InitPartsUpload(FunctionParameters)
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

View File

@ -501,7 +501,7 @@ Function ProcessXML(XML) Export
ReturnValue = New Map;
WHile XML.Read() Do
While XML.Read() Do
NodeType = XML.NodeType;
@ -915,7 +915,7 @@ Procedure ProgressInformation(Val Current, Val Total, Val Unit, Val Divider = 1)
Indicator = Int(Current / Total * BarLength);
WHile Counter < BarLength Do
While Counter < BarLength Do
Buffer = Buffer + ?(Counter < Indicator, "█", " ");
Counter = Counter + 1;
EndDo;
@ -924,6 +924,10 @@ Procedure ProgressInformation(Val Current, Val Total, Val Unit, Val Divider = 1)
WriteOnCurrentLine(Buffer , "Green");
WriteOnCurrentLine(Information);
If Percent = 100 Then
WriteOnCurrentLine("", , True);
EndIf;
EndProcedure
#EndRegion
@ -1213,7 +1217,7 @@ Procedure WriteBinaryData(DataWriter, Val BinaryData)
CurrentPosition = 0;
TotalSize = BinaryData.Size();
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
DataReader = New DataReader(BinaryData);
BytesRead = DataReader.Skip(CurrentPosition);
@ -1316,7 +1320,7 @@ Procedure WriteOnCurrentLine(Val Text, Val Color = "", Val ToStart = False) Expo
Color = ConsoleColor.White;
EndIf;
If TypeOf(Color) = Type("String") Then
If TypeOf(Color) = Type("String") Then
Console.TextColor = ConsoleColor[Color];
Else
Console.TextColor = Color;

View File

@ -842,7 +842,7 @@ Function UploadLargeFile(Val Token, Val File, Val Path, Val Mode)
TotalSize = File.Size();
Session = OpenSession(Token);
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
Indent = CurrentPosition;
Cursor = New Structure("offset,session_id", Indent, Session);

View File

@ -640,7 +640,7 @@ Function UploadFileInParts(Val Binary, Val UploadURL)
DataReader = New DataReader(Binary);
SourceStream = DataReader.SourceStream();
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
BytesRead = SourceStream.CurrentPosition();
Result = DataReader.Read(ChunkSize);

View File

@ -565,6 +565,7 @@ Function PutObject(Val Name
If OPI_Tools.CollectionFieldExists(BasicData_, "ChunkSize") Then
MaxSize = BasicData_["ChunkSize"];
OPI_TypeConversion.GetNumber(MaxSize);
Else
MaxSize = 20971520;
EndIf;
@ -850,6 +851,7 @@ Function GetObject(Val Name
If OPI_Tools.CollectionFieldExists(BasicData_, "ChunkSize") Then
MaxSize = BasicData_["ChunkSize"];
OPI_TypeConversion.GetNumber(MaxSize);
Else
MaxSize = 20971520;
EndIf;
@ -1674,7 +1676,7 @@ Function GetObjectInChunks(Val BasicData
HeadersArray = New Array;
WHile ChunkStart < TotalSize - ChunkSize Do
While ChunkStart < TotalSize - ChunkSize Do
ChunkEnd = ChunkStart + ChunkSize - 1;
@ -1798,7 +1800,7 @@ Function UploadObjectInParts(Val Name
Attempts = 3;
LastSuccessCode = 299;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
For N = 1 To Attempts Do

View File

@ -7346,7 +7346,7 @@ Procedure Dropbox_GetUploadStatusByURL(FunctionParameters)
WorkID = FunctionParameters["Dropbox_Job"];
Status = "in_progress";
WHile Status = "in_progress" Do
While Status = "in_progress" Do
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
Status = Result[".tag"];
@ -7708,7 +7708,7 @@ Procedure Dropbox_CancelFolderPublication(FunctionParameters)
CurrentStatus = "in_progress";
JobID = Result["async_job_id"];
WHile CurrentStatus = "in_progress" Do
While CurrentStatus = "in_progress" Do
Result = OPI_Dropbox.GetAsynchronousChangeStatus(Token, JobID);
CurrentStatus = Result[".tag"];
OPI_Tools.Pause(3);
@ -12963,7 +12963,7 @@ Procedure Ozon_GetProductCreationStatus(FunctionParameters)
OPI_TestDataRetrieval.WriteLog(Result, "GetProductCreationStatus", "Ozon");
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
@ -13002,7 +13002,7 @@ Procedure Ozon_CreateProductByOzonID(FunctionParameters)
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
@ -13068,7 +13068,7 @@ Procedure Ozon_UpdateProductsAttributes(FunctionParameters)
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
@ -13373,7 +13373,7 @@ Procedure Ozon_GetCodesUploadStatus(FunctionParameters)
OPI_TestDataRetrieval.WriteLog(Result, "GetCodesUploadStatus", "Ozon");
If ValueIsFilled(Result["result"]) Then
WHile Result["result"]["status"] = "pending" Do
While Result["result"]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetCodesUploadStatus(ClientID, APIKey, TaskID);
@ -14234,7 +14234,7 @@ Procedure CDEK_RegisterDeliveryAppointment(FunctionParameters)
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
DeliveryDate = CurrentDate + Day * 14;
WHile WeekDay(DeliveryDate) > 5 Do
While WeekDay(DeliveryDate) > 5 Do
DeliveryDate = DeliveryDate + Day;
EndDo;
@ -15388,7 +15388,7 @@ Procedure S3_InitPartsUpload(FunctionParameters)
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();
@ -15459,7 +15459,7 @@ Procedure S3_FinishPartsUpload(FunctionParameters)
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();
@ -15531,7 +15531,7 @@ Procedure S3_UploadObjectPart(FunctionParameters)
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

View File

@ -8013,7 +8013,7 @@ Procedure CLI_Dropbox_GetUploadStatusByURL(FunctionParameters)
WorkID = FunctionParameters["Dropbox_Job"];
Status = "in_progress";
WHile Status = "in_progress" Do
While Status = "in_progress" Do
Options = New Structure;
Options.Insert("token" , Token);
@ -8434,7 +8434,7 @@ Procedure CLI_Dropbox_CancelFolderPublication(FunctionParameters)
CurrentStatus = "in_progress";
JobID = Result["async_job_id"];
WHile CurrentStatus = "in_progress" Do
While CurrentStatus = "in_progress" Do
Options = New Structure;
Options.Insert("token" , Token);
@ -9509,7 +9509,7 @@ Procedure CLI_Ozon_GetProductCreationStatus(FunctionParameters)
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetProductCreationStatus", "Ozon");
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
@ -9555,7 +9555,7 @@ Procedure CLI_Ozon_CreateProductByOzonID(FunctionParameters)
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
@ -9623,7 +9623,7 @@ Procedure CLI_Ozon_UpdateProductsAttributes(FunctionParameters)
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
WHile Result["result"]["items"][0]["status"] = "pending" Do
While Result["result"]["items"][0]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
@ -9952,7 +9952,7 @@ Procedure CLI_Ozon_GetCodesUploadStatus(FunctionParameters)
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetCodesUploadStatus", "Ozon");
If ValueIsFilled(Result["result"]) Then
WHile Result["result"]["status"] = "pending" Do
While Result["result"]["status"] = "pending" Do
OPI_Tools.Pause(30);
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetCodesUploadStatus", Options);
@ -16148,7 +16148,7 @@ Procedure CLI_CDEK_RegisterDeliveryAppointment(FunctionParameters)
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
DeliveryDate = CurrentDate + Day * 14;
WHile WeekDay(DeliveryDate) > 5 Do
While WeekDay(DeliveryDate) > 5 Do
DeliveryDate = DeliveryDate + Day;
EndDo;
@ -17688,7 +17688,7 @@ Procedure CLI_S3_InitPartsUpload(FunctionParameters)
SourceStream = DataReader.SourceStream();
TagsArray = New Array;
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
CurrentReading = DataReader.Read(ChunkSize);
CurrentData = CurrentReading.GetBinaryData();

View File

@ -501,7 +501,7 @@ Function ProcessXML(XML) Export
ReturnValue = New Map;
WHile XML.Read() Do
While XML.Read() Do
NodeType = XML.NodeType;
@ -915,7 +915,7 @@ Procedure ProgressInformation(Val Current, Val Total, Val Unit, Val Divider = 1)
Indicator = Int(Current / Total * BarLength);
WHile Counter < BarLength Loop
While Counter < BarLength Do
Buffer = Buffer + ?(Counter < Indicator, "█", " ");
Counter = Counter + 1;
EndDo;
@ -924,6 +924,10 @@ Procedure ProgressInformation(Val Current, Val Total, Val Unit, Val Divider = 1)
WriteOnCurrentLine(Buffer , "Green");
WriteOnCurrentLine(Information);
If Percent = 100 Then
WriteOnCurrentLine("", , True);
EndIf;
EndProcedure
#EndRegion
@ -1213,7 +1217,7 @@ Procedure WriteBinaryData(DataWriter, Val BinaryData)
CurrentPosition = 0;
TotalSize = BinaryData.Size();
WHile BytesRead < TotalSize Do
While BytesRead < TotalSize Do
DataReader = New DataReader(BinaryData);
BytesRead = DataReader.Skip(CurrentPosition);
@ -1316,7 +1320,7 @@ Procedure WriteOnCurrentLine(Val Text, Val Color = "", Val ToStart = False) Expo
Color = ConsoleColor.White;
EndIf;
If TypeOf(Color) = Type("String") Then
If TypeOf(Color) = Type("String") Then
Console.TextColor = ConsoleColor[Color];
Else
Console.TextColor = Color;

View File

@ -441,7 +441,7 @@ Function WaitForProcessingCompletion(Val ProcessingStatus, Val InitializationID,
Fields.Insert(Command , "STATUS");
Fields.Insert("media_id", InitializationID);
WHile String(ProcessingStatus) = "pending" Or String(ProcessingStatus) = "in_progress" Do
While String(ProcessingStatus) = "pending" Or String(ProcessingStatus) = "in_progress" Do
Authorization = CreateAuthorizationHeaderV1(Parameters, Fields, "GET", URL);
Response = OPI_Tools.Get(URL, Fields, Authorization);

View File

@ -565,6 +565,7 @@
Если OPI_Инструменты.ПолеКоллекцииСуществует(ОсновныеДанные_, "ChunkSize") Тогда
МаксимальныйРазмер = ОсновныеДанные_["ChunkSize"];
OPI_ПреобразованиеТипов.ПолучитьЧисло(МаксимальныйРазмер);
Иначе
МаксимальныйРазмер = 20971520;
КонецЕсли;
@ -850,6 +851,7 @@
Если OPI_Инструменты.ПолеКоллекцииСуществует(ОсновныеДанные_, "ChunkSize") Тогда
МаксимальныйРазмер = ОсновныеДанные_["ChunkSize"];
OPI_ПреобразованиеТипов.ПолучитьЧисло(МаксимальныйРазмер);
Иначе
МаксимальныйРазмер = 20971520;
КонецЕсли;

View File

@ -924,6 +924,10 @@
ВывестиТекстВТекущуюСтроку(Буфер , "Зеленый");
ВывестиТекстВТекущуюСтроку(Информация);
Если Процент = 100 Тогда
ВывестиТекстВТекущуюСтроку("", , Истина);
КонецЕсли;
КонецПроцедуры
#КонецОбласти

View File

@ -909,25 +909,25 @@
Информация = "▌ " + СтрТекущее + "/" + СтрВсего + " " + ЕдИзм;
// Прогресс бар
ДлинаПолоски = 30;
Счетчик = 0;
Буфер = "";
Показатель = Цел(Текущее / Всего * ДлинаПолоски);
Пока Счетчик < ДлинаПолоски Цикл
Буфер = Буфер + ?(Счетчик < Показатель, "█", " ");
Счетчик = Счетчик + 1;
КонецЦикла;
ВывестиТекстВТекущуюСтроку(Прогресс, , Истина);
ВывестиТекстВТекущуюСтроку(Буфер, "Зеленый");
ВывестиТекстВТекущуюСтроку(Информация);
Если Процент = 100 Тогда
ВывестиТекстВТекущуюСтроку("", , Истина);
КонецЕсли;
ДлинаПолоски = 30;
Счетчик = 0;
Буфер = "";
Показатель = Цел(Текущее / Всего * ДлинаПолоски);
Пока Счетчик < ДлинаПолоски Цикл
Буфер = Буфер + ?(Счетчик < Показатель, "█", " ");
Счетчик = Счетчик + 1;
КонецЦикла;
ВывестиТекстВТекущуюСтроку(Прогресс, , Истина);
ВывестиТекстВТекущуюСтроку(Буфер , "Зеленый");
ВывестиТекстВТекущуюСтроку(Информация);
Если Процент = 100 Тогда
ВывестиТекстВТекущуюСтроку("", , Истина);
КонецЕсли;
КонецПроцедуры
#КонецОбласти