| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. See License.txt in the project root for license information. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.Collections.Generic; |
| | | 6 | | using System.Linq; |
| | | 7 | | using System.Text; |
| | | 8 | | using System.Threading.Tasks; |
| | | 9 | | |
| | | 10 | | namespace Microsoft.Azure.Batch |
| | | 11 | | { |
| | | 12 | | /// <summary> |
| | | 13 | | /// Contains constants for interacting with the Azure Batch service. |
| | | 14 | | /// </summary> |
| | | 15 | | public static class Constants |
| | | 16 | | { |
| | | 17 | | /// <summary> |
| | | 18 | | /// The prefix used when creating automatically named containers or blobs as part of file staging. |
| | | 19 | | /// </summary> |
| | | 20 | | public const string DefaultConveniencePrefix = "mab-"; |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// The name of the standard output file generated by a task or start task on a compute node. |
| | | 24 | | /// </summary> |
| | | 25 | | public const string StandardOutFileName = "stdout.txt"; |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// The name of the standard error file generated by a task or start task on a compute node. |
| | | 29 | | /// </summary> |
| | | 30 | | public const string StandardErrorFileName = "stderr.txt"; |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// The maximum number of tasks that the client will include in a single AddTaskCollection request, |
| | | 34 | | /// when adding multiple tasks to a job. |
| | | 35 | | /// </summary> |
| | | 36 | | public const int MaxTasksInSingleAddTaskCollectionRequest = 100; |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// The default amount of time to wait for a response from the Batch service before automatically cancelling the |
| | | 40 | | /// request. |
| | | 41 | | /// </summary> |
| | 1 | 42 | | public static readonly TimeSpan DefaultSingleRestRequestClientTimeout = TimeSpan.FromSeconds(60); |
| | | 43 | | |
| | | 44 | | /// <summary> |
| | | 45 | | /// The default amount of time to wait for a response from the Batch service before automatically cancelling the |
| | | 46 | | /// request. This is used for "long running" requests such as get file and bulk add task. |
| | | 47 | | /// </summary> |
| | 1 | 48 | | public static readonly TimeSpan DefaultLongRestRequestClientTimeout = TimeSpan.FromSeconds(180); |
| | | 49 | | } |
| | | 50 | | |
| | | 51 | | internal static class InternalConstants |
| | | 52 | | { |
| | | 53 | | /// <summary> |
| | | 54 | | /// The value to use for UserAgent header. |
| | | 55 | | /// </summary> |
| | | 56 | | internal const string UserAgentProductName = "AzBatch"; |
| | | 57 | | |
| | | 58 | | internal const string ClientRequestIdHeader = "client-request-id"; |
| | | 59 | | |
| | | 60 | | internal const string RequestIdHeader = "request-id"; |
| | | 61 | | |
| | | 62 | | internal const string RetryAfterHeader = "retry-after"; |
| | | 63 | | } |
| | | 64 | | } |