mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-04-15 11:56:36 +02:00
Main build (Jenkins)
This commit is contained in:
parent
40d404dcd9
commit
b5433562c2
@ -5,7 +5,7 @@
|
|||||||
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
||||||
DeliveryDate = CurrentDate + Day * 14;
|
DeliveryDate = CurrentDate + Day * 14;
|
||||||
|
|
||||||
WHile DayOfWeek(DeliveryDate) > 5 Do
|
While DayOfWeek(DeliveryDate) > 5 Do
|
||||||
DeliveryDate = DeliveryDate + Day;
|
DeliveryDate = DeliveryDate + Day;
|
||||||
EndDo;
|
EndDo;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
WorkID = "AF1jdkYTLTYAAAAAAAAAAQ";
|
WorkID = "AF1jdkYTLTYAAAAAAAAAAQ";
|
||||||
Status = "in_progress";
|
Status = "in_progress";
|
||||||
|
|
||||||
WHile Status = "in_progress" Do
|
While Status = "in_progress" Do
|
||||||
|
|
||||||
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
|
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
|
||||||
Status = Result[".tag"];
|
Status = Result[".tag"];
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
@ -37,7 +37,7 @@ Method at API documentation: [Registration of delivery appointment](https://api-
|
|||||||
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
||||||
DeliveryDate = CurrentDate + Day * 14;
|
DeliveryDate = CurrentDate + Day * 14;
|
||||||
|
|
||||||
WHile DayOfWeek(DeliveryDate) > 5 Do
|
While DayOfWeek(DeliveryDate) > 5 Do
|
||||||
DeliveryDate = DeliveryDate + Day;
|
DeliveryDate = DeliveryDate + Day;
|
||||||
EndDo;
|
EndDo;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import TabItem from '@theme/TabItem';
|
|||||||
WorkID = "AF1jdkYTLTYAAAAAAAAAAQ";
|
WorkID = "AF1jdkYTLTYAAAAAAAAAAQ";
|
||||||
Status = "in_progress";
|
Status = "in_progress";
|
||||||
|
|
||||||
WHile Status = "in_progress" Do
|
While Status = "in_progress" Do
|
||||||
|
|
||||||
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
|
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
|
||||||
Status = Result[".tag"];
|
Status = Result[".tag"];
|
||||||
|
@ -60,7 +60,7 @@ This is a service method. A `PutObject` method is intended for the common scenar
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
@ -59,7 +59,7 @@ This is a service method. A `PutObject` method is intended for the common scenar
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
@ -63,7 +63,7 @@ Parameters with Binary data type can also accept file paths on disk and URLs
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -842,7 +842,7 @@ Function UploadLargeFile(Val Token, Val File, Val Path, Val Mode)
|
|||||||
TotalSize = File.Size();
|
TotalSize = File.Size();
|
||||||
Session = OpenSession(Token);
|
Session = OpenSession(Token);
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
Indent = CurrentPosition;
|
Indent = CurrentPosition;
|
||||||
Cursor = New Structure("offset,session_id", Indent, Session);
|
Cursor = New Structure("offset,session_id", Indent, Session);
|
||||||
|
@ -640,7 +640,7 @@ Function UploadFileInParts(Val Binary, Val UploadURL)
|
|||||||
DataReader = New DataReader(Binary);
|
DataReader = New DataReader(Binary);
|
||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
BytesRead = SourceStream.CurrentPosition();
|
BytesRead = SourceStream.CurrentPosition();
|
||||||
Result = DataReader.Read(ChunkSize);
|
Result = DataReader.Read(ChunkSize);
|
||||||
|
@ -565,6 +565,7 @@ Function PutObject(Val Name
|
|||||||
|
|
||||||
If OPI_Tools.CollectionFieldExist(BasicData_, "ChunkSize") Then
|
If OPI_Tools.CollectionFieldExist(BasicData_, "ChunkSize") Then
|
||||||
MaxSize = BasicData_["ChunkSize"];
|
MaxSize = BasicData_["ChunkSize"];
|
||||||
|
OPI_TypeConversion.GetNumber(MaxSize);
|
||||||
Else
|
Else
|
||||||
MaxSize = 20971520;
|
MaxSize = 20971520;
|
||||||
EndIf;
|
EndIf;
|
||||||
@ -850,6 +851,7 @@ Function GetObject(Val Name
|
|||||||
|
|
||||||
If OPI_Tools.CollectionFieldExist(BasicData_, "ChunkSize") Then
|
If OPI_Tools.CollectionFieldExist(BasicData_, "ChunkSize") Then
|
||||||
MaxSize = BasicData_["ChunkSize"];
|
MaxSize = BasicData_["ChunkSize"];
|
||||||
|
OPI_TypeConversion.GetNumber(MaxSize);
|
||||||
Else
|
Else
|
||||||
MaxSize = 20971520;
|
MaxSize = 20971520;
|
||||||
EndIf;
|
EndIf;
|
||||||
@ -1674,7 +1676,7 @@ Function GetObjectInChunks(Val BasicData
|
|||||||
|
|
||||||
HeadersArray = New Array;
|
HeadersArray = New Array;
|
||||||
|
|
||||||
WHile ChunkStart < TotalSize - ChunkSize Do
|
While ChunkStart < TotalSize - ChunkSize Do
|
||||||
|
|
||||||
ChunkEnd = ChunkStart + ChunkSize - 1;
|
ChunkEnd = ChunkStart + ChunkSize - 1;
|
||||||
|
|
||||||
@ -1798,7 +1800,7 @@ Function UploadObjectInParts(Val Name
|
|||||||
Attempts = 3;
|
Attempts = 3;
|
||||||
LastSuccessCode = 299;
|
LastSuccessCode = 299;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
For N = 1 To Attempts Do
|
For N = 1 To Attempts Do
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ Function WaitForProcessingCompletion(Val ProcessingStatus, Val InitializationID,
|
|||||||
Fields.Insert(Command , "STATUS");
|
Fields.Insert(Command , "STATUS");
|
||||||
Fields.Insert("media_id", InitializationID);
|
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);
|
Authorization = CreateAuthorizationHeaderV1(Parameters, Fields, "GET", URL);
|
||||||
Response = OPI_Tools.Get(URL, Fields, Authorization);
|
Response = OPI_Tools.Get(URL, Fields, Authorization);
|
||||||
|
@ -7346,7 +7346,7 @@ Procedure Dropbox_GetUploadStatusByURL(FunctionParameters)
|
|||||||
WorkID = FunctionParameters["Dropbox_Job"];
|
WorkID = FunctionParameters["Dropbox_Job"];
|
||||||
Status = "in_progress";
|
Status = "in_progress";
|
||||||
|
|
||||||
WHile Status = "in_progress" Do
|
While Status = "in_progress" Do
|
||||||
|
|
||||||
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
|
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
|
||||||
Status = Result[".tag"];
|
Status = Result[".tag"];
|
||||||
@ -7708,7 +7708,7 @@ Procedure Dropbox_CancelFolderPublication(FunctionParameters)
|
|||||||
CurrentStatus = "in_progress";
|
CurrentStatus = "in_progress";
|
||||||
JobID = Result["async_job_id"];
|
JobID = Result["async_job_id"];
|
||||||
|
|
||||||
WHile CurrentStatus = "in_progress" Do
|
While CurrentStatus = "in_progress" Do
|
||||||
Result = OPI_Dropbox.GetAsynchronousChangeStatus(Token, JobID);
|
Result = OPI_Dropbox.GetAsynchronousChangeStatus(Token, JobID);
|
||||||
CurrentStatus = Result[".tag"];
|
CurrentStatus = Result[".tag"];
|
||||||
OPI_Tools.Pause(3);
|
OPI_Tools.Pause(3);
|
||||||
@ -12963,7 +12963,7 @@ Procedure Ozon_GetProductCreationStatus(FunctionParameters)
|
|||||||
|
|
||||||
OPI_TestDataRetrieval.WriteLog(Result, "GetProductCreationStatus", "Ozon");
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
||||||
@ -13002,7 +13002,7 @@ Procedure Ozon_CreateProductByOzonID(FunctionParameters)
|
|||||||
|
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
||||||
@ -13068,7 +13068,7 @@ Procedure Ozon_UpdateProductsAttributes(FunctionParameters)
|
|||||||
|
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
||||||
@ -13373,7 +13373,7 @@ Procedure Ozon_GetCodesUploadStatus(FunctionParameters)
|
|||||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCodesUploadStatus", "Ozon");
|
OPI_TestDataRetrieval.WriteLog(Result, "GetCodesUploadStatus", "Ozon");
|
||||||
|
|
||||||
If ValueIsFilled(Result["result"]) Then
|
If ValueIsFilled(Result["result"]) Then
|
||||||
WHile Result["result"]["status"] = "pending" Do
|
While Result["result"]["status"] = "pending" Do
|
||||||
|
|
||||||
OPI_Tools.Pause(30);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetCodesUploadStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetCodesUploadStatus(ClientID, APIKey, TaskID);
|
||||||
@ -14234,7 +14234,7 @@ Procedure CDEK_RegisterDeliveryAppointment(FunctionParameters)
|
|||||||
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
||||||
DeliveryDate = CurrentDate + Day * 14;
|
DeliveryDate = CurrentDate + Day * 14;
|
||||||
|
|
||||||
WHile DayOfWeek(DeliveryDate) > 5 Do
|
While DayOfWeek(DeliveryDate) > 5 Do
|
||||||
DeliveryDate = DeliveryDate + Day;
|
DeliveryDate = DeliveryDate + Day;
|
||||||
EndDo;
|
EndDo;
|
||||||
|
|
||||||
@ -15388,7 +15388,7 @@ Procedure S3_InitPartsUpload(FunctionParameters)
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
@ -15459,7 +15459,7 @@ Procedure S3_FinishPartsUpload(FunctionParameters)
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
@ -15531,7 +15531,7 @@ Procedure S3_UploadObjectPart(FunctionParameters)
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
@ -8013,7 +8013,7 @@ Procedure CLI_Dropbox_GetUploadStatusByURL(FunctionParameters)
|
|||||||
WorkID = FunctionParameters["Dropbox_Job"];
|
WorkID = FunctionParameters["Dropbox_Job"];
|
||||||
Status = "in_progress";
|
Status = "in_progress";
|
||||||
|
|
||||||
WHile Status = "in_progress" Do
|
While Status = "in_progress" Do
|
||||||
|
|
||||||
Options = New Structure;
|
Options = New Structure;
|
||||||
Options.Insert("token" , Token);
|
Options.Insert("token" , Token);
|
||||||
@ -8434,7 +8434,7 @@ Procedure CLI_Dropbox_CancelFolderPublication(FunctionParameters)
|
|||||||
CurrentStatus = "in_progress";
|
CurrentStatus = "in_progress";
|
||||||
JobID = Result["async_job_id"];
|
JobID = Result["async_job_id"];
|
||||||
|
|
||||||
WHile CurrentStatus = "in_progress" Do
|
While CurrentStatus = "in_progress" Do
|
||||||
|
|
||||||
Options = New Structure;
|
Options = New Structure;
|
||||||
Options.Insert("token" , Token);
|
Options.Insert("token" , Token);
|
||||||
@ -9509,7 +9509,7 @@ Procedure CLI_Ozon_GetProductCreationStatus(FunctionParameters)
|
|||||||
|
|
||||||
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetProductCreationStatus", "Ozon");
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
||||||
@ -9555,7 +9555,7 @@ Procedure CLI_Ozon_CreateProductByOzonID(FunctionParameters)
|
|||||||
|
|
||||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
||||||
@ -9623,7 +9623,7 @@ Procedure CLI_Ozon_UpdateProductsAttributes(FunctionParameters)
|
|||||||
|
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
||||||
@ -9952,7 +9952,7 @@ Procedure CLI_Ozon_GetCodesUploadStatus(FunctionParameters)
|
|||||||
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetCodesUploadStatus", "Ozon");
|
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetCodesUploadStatus", "Ozon");
|
||||||
|
|
||||||
If ValueIsFilled(Result["result"]) Then
|
If ValueIsFilled(Result["result"]) Then
|
||||||
WHile Result["result"]["status"] = "pending" Do
|
While Result["result"]["status"] = "pending" Do
|
||||||
|
|
||||||
OPI_Tools.Pause(30);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetCodesUploadStatus", Options);
|
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetCodesUploadStatus", Options);
|
||||||
@ -16148,7 +16148,7 @@ Procedure CLI_CDEK_RegisterDeliveryAppointment(FunctionParameters)
|
|||||||
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
||||||
DeliveryDate = CurrentDate + Day * 14;
|
DeliveryDate = CurrentDate + Day * 14;
|
||||||
|
|
||||||
WHile DayOfWeek(DeliveryDate) > 5 Do
|
While DayOfWeek(DeliveryDate) > 5 Do
|
||||||
DeliveryDate = DeliveryDate + Day;
|
DeliveryDate = DeliveryDate + Day;
|
||||||
EndDo;
|
EndDo;
|
||||||
|
|
||||||
@ -17688,7 +17688,7 @@ Procedure CLI_S3_InitPartsUpload(FunctionParameters)
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
@ -501,7 +501,7 @@ Function ProcessXML(XML) Export
|
|||||||
|
|
||||||
ReturnValue = New Map;
|
ReturnValue = New Map;
|
||||||
|
|
||||||
WHile XML.Read() Do
|
While XML.Read() Do
|
||||||
|
|
||||||
NodeType = XML.NodeType;
|
NodeType = XML.NodeType;
|
||||||
|
|
||||||
@ -915,7 +915,7 @@ Procedure ProgressInformation(Val Current, Val Total, Val Unit, Val Divider = 1)
|
|||||||
|
|
||||||
Indicator = Int(Current / Total * BarLength);
|
Indicator = Int(Current / Total * BarLength);
|
||||||
|
|
||||||
WHile Counter < BarLength Do
|
While Counter < BarLength Do
|
||||||
Buffer = Buffer + ?(Counter < Indicator, "█", " ");
|
Buffer = Buffer + ?(Counter < Indicator, "█", " ");
|
||||||
Counter = Counter + 1;
|
Counter = Counter + 1;
|
||||||
EndDo;
|
EndDo;
|
||||||
@ -924,6 +924,10 @@ Procedure ProgressInformation(Val Current, Val Total, Val Unit, Val Divider = 1)
|
|||||||
WriteOnCurrentLine(Buffer , "Green");
|
WriteOnCurrentLine(Buffer , "Green");
|
||||||
WriteOnCurrentLine(Information);
|
WriteOnCurrentLine(Information);
|
||||||
|
|
||||||
|
If Percent = 100 Then
|
||||||
|
WriteOnCurrentLine("", , True);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
#EndRegion
|
#EndRegion
|
||||||
@ -1213,7 +1217,7 @@ Procedure WriteBinaryData(DataWriter, Val BinaryData)
|
|||||||
CurrentPosition = 0;
|
CurrentPosition = 0;
|
||||||
TotalSize = BinaryData.Size();
|
TotalSize = BinaryData.Size();
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
DataReader = New DataReader(BinaryData);
|
DataReader = New DataReader(BinaryData);
|
||||||
BytesRead = DataReader.Skip(CurrentPosition);
|
BytesRead = DataReader.Skip(CurrentPosition);
|
||||||
@ -1316,7 +1320,7 @@ Procedure WriteOnCurrentLine(Val Text, Val Color = "", Val ToStart = False) Expo
|
|||||||
Color = ConsoleColor.White;
|
Color = ConsoleColor.White;
|
||||||
EndIf;
|
EndIf;
|
||||||
|
|
||||||
If TypeOf(Color) = Type("String") Then
|
If TypeOf(Color) = Type("String") Then
|
||||||
Console.TextColor = ConsoleColor[Color];
|
Console.TextColor = ConsoleColor[Color];
|
||||||
Else
|
Else
|
||||||
Console.TextColor = Color;
|
Console.TextColor = Color;
|
||||||
|
@ -842,7 +842,7 @@ Function UploadLargeFile(Val Token, Val File, Val Path, Val Mode)
|
|||||||
TotalSize = File.Size();
|
TotalSize = File.Size();
|
||||||
Session = OpenSession(Token);
|
Session = OpenSession(Token);
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
Indent = CurrentPosition;
|
Indent = CurrentPosition;
|
||||||
Cursor = New Structure("offset,session_id", Indent, Session);
|
Cursor = New Structure("offset,session_id", Indent, Session);
|
||||||
|
@ -640,7 +640,7 @@ Function UploadFileInParts(Val Binary, Val UploadURL)
|
|||||||
DataReader = New DataReader(Binary);
|
DataReader = New DataReader(Binary);
|
||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
BytesRead = SourceStream.CurrentPosition();
|
BytesRead = SourceStream.CurrentPosition();
|
||||||
Result = DataReader.Read(ChunkSize);
|
Result = DataReader.Read(ChunkSize);
|
||||||
|
@ -565,6 +565,7 @@ Function PutObject(Val Name
|
|||||||
|
|
||||||
If OPI_Tools.CollectionFieldExists(BasicData_, "ChunkSize") Then
|
If OPI_Tools.CollectionFieldExists(BasicData_, "ChunkSize") Then
|
||||||
MaxSize = BasicData_["ChunkSize"];
|
MaxSize = BasicData_["ChunkSize"];
|
||||||
|
OPI_TypeConversion.GetNumber(MaxSize);
|
||||||
Else
|
Else
|
||||||
MaxSize = 20971520;
|
MaxSize = 20971520;
|
||||||
EndIf;
|
EndIf;
|
||||||
@ -850,6 +851,7 @@ Function GetObject(Val Name
|
|||||||
|
|
||||||
If OPI_Tools.CollectionFieldExists(BasicData_, "ChunkSize") Then
|
If OPI_Tools.CollectionFieldExists(BasicData_, "ChunkSize") Then
|
||||||
MaxSize = BasicData_["ChunkSize"];
|
MaxSize = BasicData_["ChunkSize"];
|
||||||
|
OPI_TypeConversion.GetNumber(MaxSize);
|
||||||
Else
|
Else
|
||||||
MaxSize = 20971520;
|
MaxSize = 20971520;
|
||||||
EndIf;
|
EndIf;
|
||||||
@ -1674,7 +1676,7 @@ Function GetObjectInChunks(Val BasicData
|
|||||||
|
|
||||||
HeadersArray = New Array;
|
HeadersArray = New Array;
|
||||||
|
|
||||||
WHile ChunkStart < TotalSize - ChunkSize Do
|
While ChunkStart < TotalSize - ChunkSize Do
|
||||||
|
|
||||||
ChunkEnd = ChunkStart + ChunkSize - 1;
|
ChunkEnd = ChunkStart + ChunkSize - 1;
|
||||||
|
|
||||||
@ -1798,7 +1800,7 @@ Function UploadObjectInParts(Val Name
|
|||||||
Attempts = 3;
|
Attempts = 3;
|
||||||
LastSuccessCode = 299;
|
LastSuccessCode = 299;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
For N = 1 To Attempts Do
|
For N = 1 To Attempts Do
|
||||||
|
|
||||||
|
@ -7346,7 +7346,7 @@ Procedure Dropbox_GetUploadStatusByURL(FunctionParameters)
|
|||||||
WorkID = FunctionParameters["Dropbox_Job"];
|
WorkID = FunctionParameters["Dropbox_Job"];
|
||||||
Status = "in_progress";
|
Status = "in_progress";
|
||||||
|
|
||||||
WHile Status = "in_progress" Do
|
While Status = "in_progress" Do
|
||||||
|
|
||||||
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
|
Result = OPI_Dropbox.GetUploadStatusByURL(Token, WorkID);
|
||||||
Status = Result[".tag"];
|
Status = Result[".tag"];
|
||||||
@ -7708,7 +7708,7 @@ Procedure Dropbox_CancelFolderPublication(FunctionParameters)
|
|||||||
CurrentStatus = "in_progress";
|
CurrentStatus = "in_progress";
|
||||||
JobID = Result["async_job_id"];
|
JobID = Result["async_job_id"];
|
||||||
|
|
||||||
WHile CurrentStatus = "in_progress" Do
|
While CurrentStatus = "in_progress" Do
|
||||||
Result = OPI_Dropbox.GetAsynchronousChangeStatus(Token, JobID);
|
Result = OPI_Dropbox.GetAsynchronousChangeStatus(Token, JobID);
|
||||||
CurrentStatus = Result[".tag"];
|
CurrentStatus = Result[".tag"];
|
||||||
OPI_Tools.Pause(3);
|
OPI_Tools.Pause(3);
|
||||||
@ -12963,7 +12963,7 @@ Procedure Ozon_GetProductCreationStatus(FunctionParameters)
|
|||||||
|
|
||||||
OPI_TestDataRetrieval.WriteLog(Result, "GetProductCreationStatus", "Ozon");
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
||||||
@ -13002,7 +13002,7 @@ Procedure Ozon_CreateProductByOzonID(FunctionParameters)
|
|||||||
|
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
||||||
@ -13068,7 +13068,7 @@ Procedure Ozon_UpdateProductsAttributes(FunctionParameters)
|
|||||||
|
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
||||||
@ -13373,7 +13373,7 @@ Procedure Ozon_GetCodesUploadStatus(FunctionParameters)
|
|||||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCodesUploadStatus", "Ozon");
|
OPI_TestDataRetrieval.WriteLog(Result, "GetCodesUploadStatus", "Ozon");
|
||||||
|
|
||||||
If ValueIsFilled(Result["result"]) Then
|
If ValueIsFilled(Result["result"]) Then
|
||||||
WHile Result["result"]["status"] = "pending" Do
|
While Result["result"]["status"] = "pending" Do
|
||||||
|
|
||||||
OPI_Tools.Pause(30);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetCodesUploadStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetCodesUploadStatus(ClientID, APIKey, TaskID);
|
||||||
@ -14234,7 +14234,7 @@ Procedure CDEK_RegisterDeliveryAppointment(FunctionParameters)
|
|||||||
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
||||||
DeliveryDate = CurrentDate + Day * 14;
|
DeliveryDate = CurrentDate + Day * 14;
|
||||||
|
|
||||||
WHile WeekDay(DeliveryDate) > 5 Do
|
While WeekDay(DeliveryDate) > 5 Do
|
||||||
DeliveryDate = DeliveryDate + Day;
|
DeliveryDate = DeliveryDate + Day;
|
||||||
EndDo;
|
EndDo;
|
||||||
|
|
||||||
@ -15388,7 +15388,7 @@ Procedure S3_InitPartsUpload(FunctionParameters)
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
@ -15459,7 +15459,7 @@ Procedure S3_FinishPartsUpload(FunctionParameters)
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
@ -15531,7 +15531,7 @@ Procedure S3_UploadObjectPart(FunctionParameters)
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
@ -8013,7 +8013,7 @@ Procedure CLI_Dropbox_GetUploadStatusByURL(FunctionParameters)
|
|||||||
WorkID = FunctionParameters["Dropbox_Job"];
|
WorkID = FunctionParameters["Dropbox_Job"];
|
||||||
Status = "in_progress";
|
Status = "in_progress";
|
||||||
|
|
||||||
WHile Status = "in_progress" Do
|
While Status = "in_progress" Do
|
||||||
|
|
||||||
Options = New Structure;
|
Options = New Structure;
|
||||||
Options.Insert("token" , Token);
|
Options.Insert("token" , Token);
|
||||||
@ -8434,7 +8434,7 @@ Procedure CLI_Dropbox_CancelFolderPublication(FunctionParameters)
|
|||||||
CurrentStatus = "in_progress";
|
CurrentStatus = "in_progress";
|
||||||
JobID = Result["async_job_id"];
|
JobID = Result["async_job_id"];
|
||||||
|
|
||||||
WHile CurrentStatus = "in_progress" Do
|
While CurrentStatus = "in_progress" Do
|
||||||
|
|
||||||
Options = New Structure;
|
Options = New Structure;
|
||||||
Options.Insert("token" , Token);
|
Options.Insert("token" , Token);
|
||||||
@ -9509,7 +9509,7 @@ Procedure CLI_Ozon_GetProductCreationStatus(FunctionParameters)
|
|||||||
|
|
||||||
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetProductCreationStatus", "Ozon");
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
||||||
@ -9555,7 +9555,7 @@ Procedure CLI_Ozon_CreateProductByOzonID(FunctionParameters)
|
|||||||
|
|
||||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetProductCreationStatus", Options);
|
||||||
@ -9623,7 +9623,7 @@ Procedure CLI_Ozon_UpdateProductsAttributes(FunctionParameters)
|
|||||||
|
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
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);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
Result = OPI_Ozon.GetProductCreationStatus(ClientID, APIKey, TaskID);
|
||||||
@ -9952,7 +9952,7 @@ Procedure CLI_Ozon_GetCodesUploadStatus(FunctionParameters)
|
|||||||
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetCodesUploadStatus", "Ozon");
|
OPI_TestDataRetrieval.WriteLogCLI(Result, "GetCodesUploadStatus", "Ozon");
|
||||||
|
|
||||||
If ValueIsFilled(Result["result"]) Then
|
If ValueIsFilled(Result["result"]) Then
|
||||||
WHile Result["result"]["status"] = "pending" Do
|
While Result["result"]["status"] = "pending" Do
|
||||||
|
|
||||||
OPI_Tools.Pause(30);
|
OPI_Tools.Pause(30);
|
||||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetCodesUploadStatus", Options);
|
Result = OPI_TestDataRetrieval.ExecuteTestCLI("ozon", "GetCodesUploadStatus", Options);
|
||||||
@ -16148,7 +16148,7 @@ Procedure CLI_CDEK_RegisterDeliveryAppointment(FunctionParameters)
|
|||||||
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
CurrentDate = BegOfDay(OPI_Tools.GetCurrentDate());
|
||||||
DeliveryDate = CurrentDate + Day * 14;
|
DeliveryDate = CurrentDate + Day * 14;
|
||||||
|
|
||||||
WHile WeekDay(DeliveryDate) > 5 Do
|
While WeekDay(DeliveryDate) > 5 Do
|
||||||
DeliveryDate = DeliveryDate + Day;
|
DeliveryDate = DeliveryDate + Day;
|
||||||
EndDo;
|
EndDo;
|
||||||
|
|
||||||
@ -17688,7 +17688,7 @@ Procedure CLI_S3_InitPartsUpload(FunctionParameters)
|
|||||||
SourceStream = DataReader.SourceStream();
|
SourceStream = DataReader.SourceStream();
|
||||||
TagsArray = New Array;
|
TagsArray = New Array;
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
CurrentReading = DataReader.Read(ChunkSize);
|
CurrentReading = DataReader.Read(ChunkSize);
|
||||||
CurrentData = CurrentReading.GetBinaryData();
|
CurrentData = CurrentReading.GetBinaryData();
|
||||||
|
@ -501,7 +501,7 @@ Function ProcessXML(XML) Export
|
|||||||
|
|
||||||
ReturnValue = New Map;
|
ReturnValue = New Map;
|
||||||
|
|
||||||
WHile XML.Read() Do
|
While XML.Read() Do
|
||||||
|
|
||||||
NodeType = XML.NodeType;
|
NodeType = XML.NodeType;
|
||||||
|
|
||||||
@ -915,7 +915,7 @@ Procedure ProgressInformation(Val Current, Val Total, Val Unit, Val Divider = 1)
|
|||||||
|
|
||||||
Indicator = Int(Current / Total * BarLength);
|
Indicator = Int(Current / Total * BarLength);
|
||||||
|
|
||||||
WHile Counter < BarLength Loop
|
While Counter < BarLength Do
|
||||||
Buffer = Buffer + ?(Counter < Indicator, "█", " ");
|
Buffer = Buffer + ?(Counter < Indicator, "█", " ");
|
||||||
Counter = Counter + 1;
|
Counter = Counter + 1;
|
||||||
EndDo;
|
EndDo;
|
||||||
@ -924,6 +924,10 @@ Procedure ProgressInformation(Val Current, Val Total, Val Unit, Val Divider = 1)
|
|||||||
WriteOnCurrentLine(Buffer , "Green");
|
WriteOnCurrentLine(Buffer , "Green");
|
||||||
WriteOnCurrentLine(Information);
|
WriteOnCurrentLine(Information);
|
||||||
|
|
||||||
|
If Percent = 100 Then
|
||||||
|
WriteOnCurrentLine("", , True);
|
||||||
|
EndIf;
|
||||||
|
|
||||||
EndProcedure
|
EndProcedure
|
||||||
|
|
||||||
#EndRegion
|
#EndRegion
|
||||||
@ -1213,7 +1217,7 @@ Procedure WriteBinaryData(DataWriter, Val BinaryData)
|
|||||||
CurrentPosition = 0;
|
CurrentPosition = 0;
|
||||||
TotalSize = BinaryData.Size();
|
TotalSize = BinaryData.Size();
|
||||||
|
|
||||||
WHile BytesRead < TotalSize Do
|
While BytesRead < TotalSize Do
|
||||||
|
|
||||||
DataReader = New DataReader(BinaryData);
|
DataReader = New DataReader(BinaryData);
|
||||||
BytesRead = DataReader.Skip(CurrentPosition);
|
BytesRead = DataReader.Skip(CurrentPosition);
|
||||||
@ -1316,7 +1320,7 @@ Procedure WriteOnCurrentLine(Val Text, Val Color = "", Val ToStart = False) Expo
|
|||||||
Color = ConsoleColor.White;
|
Color = ConsoleColor.White;
|
||||||
EndIf;
|
EndIf;
|
||||||
|
|
||||||
If TypeOf(Color) = Type("String") Then
|
If TypeOf(Color) = Type("String") Then
|
||||||
Console.TextColor = ConsoleColor[Color];
|
Console.TextColor = ConsoleColor[Color];
|
||||||
Else
|
Else
|
||||||
Console.TextColor = Color;
|
Console.TextColor = Color;
|
||||||
|
@ -441,7 +441,7 @@ Function WaitForProcessingCompletion(Val ProcessingStatus, Val InitializationID,
|
|||||||
Fields.Insert(Command , "STATUS");
|
Fields.Insert(Command , "STATUS");
|
||||||
Fields.Insert("media_id", InitializationID);
|
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);
|
Authorization = CreateAuthorizationHeaderV1(Parameters, Fields, "GET", URL);
|
||||||
Response = OPI_Tools.Get(URL, Fields, Authorization);
|
Response = OPI_Tools.Get(URL, Fields, Authorization);
|
||||||
|
@ -565,6 +565,7 @@
|
|||||||
|
|
||||||
Если OPI_Инструменты.ПолеКоллекцииСуществует(ОсновныеДанные_, "ChunkSize") Тогда
|
Если OPI_Инструменты.ПолеКоллекцииСуществует(ОсновныеДанные_, "ChunkSize") Тогда
|
||||||
МаксимальныйРазмер = ОсновныеДанные_["ChunkSize"];
|
МаксимальныйРазмер = ОсновныеДанные_["ChunkSize"];
|
||||||
|
OPI_ПреобразованиеТипов.ПолучитьЧисло(МаксимальныйРазмер);
|
||||||
Иначе
|
Иначе
|
||||||
МаксимальныйРазмер = 20971520;
|
МаксимальныйРазмер = 20971520;
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
@ -850,6 +851,7 @@
|
|||||||
|
|
||||||
Если OPI_Инструменты.ПолеКоллекцииСуществует(ОсновныеДанные_, "ChunkSize") Тогда
|
Если OPI_Инструменты.ПолеКоллекцииСуществует(ОсновныеДанные_, "ChunkSize") Тогда
|
||||||
МаксимальныйРазмер = ОсновныеДанные_["ChunkSize"];
|
МаксимальныйРазмер = ОсновныеДанные_["ChunkSize"];
|
||||||
|
OPI_ПреобразованиеТипов.ПолучитьЧисло(МаксимальныйРазмер);
|
||||||
Иначе
|
Иначе
|
||||||
МаксимальныйРазмер = 20971520;
|
МаксимальныйРазмер = 20971520;
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
@ -924,6 +924,10 @@
|
|||||||
ВывестиТекстВТекущуюСтроку(Буфер , "Зеленый");
|
ВывестиТекстВТекущуюСтроку(Буфер , "Зеленый");
|
||||||
ВывестиТекстВТекущуюСтроку(Информация);
|
ВывестиТекстВТекущуюСтроку(Информация);
|
||||||
|
|
||||||
|
Если Процент = 100 Тогда
|
||||||
|
ВывестиТекстВТекущуюСтроку("", , Истина);
|
||||||
|
КонецЕсли;
|
||||||
|
|
||||||
КонецПроцедуры
|
КонецПроцедуры
|
||||||
|
|
||||||
#КонецОбласти
|
#КонецОбласти
|
||||||
|
@ -909,25 +909,25 @@
|
|||||||
Информация = "▌ " + СтрТекущее + "/" + СтрВсего + " " + ЕдИзм;
|
Информация = "▌ " + СтрТекущее + "/" + СтрВсего + " " + ЕдИзм;
|
||||||
|
|
||||||
// Прогресс бар
|
// Прогресс бар
|
||||||
ДлинаПолоски = 30;
|
ДлинаПолоски = 30;
|
||||||
Счетчик = 0;
|
Счетчик = 0;
|
||||||
Буфер = "";
|
Буфер = "";
|
||||||
|
|
||||||
Показатель = Цел(Текущее / Всего * ДлинаПолоски);
|
Показатель = Цел(Текущее / Всего * ДлинаПолоски);
|
||||||
|
|
||||||
Пока Счетчик < ДлинаПолоски Цикл
|
Пока Счетчик < ДлинаПолоски Цикл
|
||||||
Буфер = Буфер + ?(Счетчик < Показатель, "█", " ");
|
Буфер = Буфер + ?(Счетчик < Показатель, "█", " ");
|
||||||
Счетчик = Счетчик + 1;
|
Счетчик = Счетчик + 1;
|
||||||
КонецЦикла;
|
КонецЦикла;
|
||||||
|
|
||||||
ВывестиТекстВТекущуюСтроку(Прогресс, , Истина);
|
ВывестиТекстВТекущуюСтроку(Прогресс, , Истина);
|
||||||
ВывестиТекстВТекущуюСтроку(Буфер, "Зеленый");
|
ВывестиТекстВТекущуюСтроку(Буфер , "Зеленый");
|
||||||
ВывестиТекстВТекущуюСтроку(Информация);
|
ВывестиТекстВТекущуюСтроку(Информация);
|
||||||
|
|
||||||
Если Процент = 100 Тогда
|
Если Процент = 100 Тогда
|
||||||
ВывестиТекстВТекущуюСтроку("", , Истина);
|
ВывестиТекстВТекущуюСтроку("", , Истина);
|
||||||
КонецЕсли;
|
КонецЕсли;
|
||||||
|
|
||||||
КонецПроцедуры
|
КонецПроцедуры
|
||||||
|
|
||||||
#КонецОбласти
|
#КонецОбласти
|
||||||
|
Loading…
x
Reference in New Issue
Block a user