// Job ID: #66e4db4bd222d903ac2fa739
using OI.Service.HangfireTask.CreatePackJob;
var createPackJobTask = Activate<CreatePackJobTask>();
await createPackJobTask.CreatePackJob(
"6681e6dad222d9139092edb8",
"66821a8e8222d302886083e5",
"michaely",
new { "6682115727976e0c545410ab" },
FromJson<PrintFoilOpions>("{\"PrintPrescriptionIds\":[\"6682115727976e0c545410ac\",\"6682115727976e0c545410ad\",\"6682115727976e0c545410ae\",\"6682115727976e0c545410af\",\"6682115727976e0c545410b0\",\"6682115727976e0c545410b1\",\"6682115727976e0c545410b2\",\"6682115727976e0c545410b3\",\"6682115727976e0c545410b4\"],\"ExportOrders\":false,\"FoildIds\":[\"6682115727976e0c545410ab\"],\"GenerateBarcode\":true,\"IsCollatedCopies\":false,\"IsCytotoxic\":false,\"IsPrintAll\":false,\"IsPRN\":false,\"IsS4N\":false,\"IsS8\":false,\"IsShortCourse\":false,\"IsSinemet\":false,\"IsWarfarin\":false,\"NumberOfCopies\":0,\"NumberOfWeek\":4,\"PartWeekPack\":7,\"PackStartDate\":\"2024-09-14T02:00:00Z\",\"PrintDate\":\"2024-09-14T02:00:00Z\",\"CurrentUserId\":\"66821a8e8222d302886083e5\",\"Client\":0,\"SpecificPrinting\":false,\"StartPosiion\":0,\"SkipPhoto\":false,\"ExpiryDate\":\"2024-11-09T01:00:00Z\",\"DoseTimeOption\":{\"DoseTimeStart\":0,\"IsBreakfast\":true,\"IsLunch\":true,\"IsDinner\":true,\"IsBedTime\":true}}"));
"en-US""en-US"An exception occurred during performance of the job.
A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = WritableServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "2", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Connected", Servers : [{ ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1024" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1024", State: "Connected", Type: "ReplicaSetSecondary", Tags: "{ provider : AWS, nodeType : ELECTABLE, workloadType : OPERATIONAL, region : AP_SOUTHEAST_2, availabilityZone : apse2-az3, diskState : READY }", WireVersionRange: "[0, 17]" }, { ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1025" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1025", State: "Connected", Type: "ReplicaSetSecondary", Tags: "{ availabilityZone : apse2-az1, diskState : READY, workloadType : OPERATIONAL, region : AP_SOUTHEAST_2, nodeType : ELECTABLE, provider : AWS }", WireVersionRange: "[0, 17]" }, { ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1026" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1026", State: "Disconnected", Type: "Unknown" }] }.
System.TimeoutException: A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = WritableServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "2", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Connected", Servers : [{ ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1024" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1024", State: "Connected", Type: "ReplicaSetSecondary", Tags: "{ provider : AWS, nodeType : ELECTABLE, workloadType : OPERATIONAL, region : AP_SOUTHEAST_2, availabilityZone : apse2-az3, diskState : READY }", WireVersionRange: "[0, 17]" }, { ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1025" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1025", State: "Connected", Type: "ReplicaSetSecondary", Tags: "{ availabilityZone : apse2-az1, diskState : READY, workloadType : OPERATIONAL, region : AP_SOUTHEAST_2, nodeType : ELECTABLE, provider : AWS }", WireVersionRange: "[0, 17]" }, { ServerId: "{ ClusterId : 2, EndPoint : "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1026" }", EndPoint: "Unspecified/pl-0-ap-southeast-2.x4umu.mongodb.net:1026", State: "Disconnected", Type: "Unknown" }] }.
at MongoDB.Driver.Core.Clusters.Cluster.ThrowTimeoutException(IServerSelector selector, ClusterDescription description)
at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChangedHelper.HandleCompletedTask(Task completedTask)
at MongoDB.Driver.Core.Clusters.Cluster.WaitForDescriptionChanged(IServerSelector selector, ClusterDescription description, Task descriptionChangedTask, TimeSpan timeout, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Clusters.Cluster.SelectServer(IServerSelector selector, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Bindings.WritableServerBinding.GetWriteChannelSource(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Bindings.ReadWriteBindingHandle.GetWriteChannelSource(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.RetryableWriteContext.Create(IWriteBinding binding, Boolean retryRequested, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.RetryableWriteOperationExecutor.Execute[TResult](IRetryableWriteOperation`1 operation, IWriteBinding binding, Boolean retryRequested, CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.FindAndModifyOperationBase`1.Execute(IWriteBinding binding, CancellationToken cancellationToken)
at MongoDB.Driver.OperationExecutor.ExecuteWriteOperation[TResult](IWriteBinding binding, IWriteOperation`1 operation, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.ExecuteWriteOperation[TResult](IClientSessionHandle session, IWriteOperation`1 operation, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.FindOneAndUpdate[TProjection](IClientSessionHandle session, FilterDefinition`1 filter, UpdateDefinition`1 update, FindOneAndUpdateOptions`2 options, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.<>c__DisplayClass53_0`1.<FindOneAndUpdate>b__0(IClientSessionHandle session)
at MongoDB.Driver.MongoCollectionImpl`1.UsingImplicitSession[TResult](Func`2 func, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.FindOneAndUpdate[TProjection](FilterDefinition`1 filter, UpdateDefinition`1 update, FindOneAndUpdateOptions`2 options, CancellationToken cancellationToken)
at OI.Data.MongoDBRepository`1.FindAndUpdate(FilterDefinition`1 filter, UpdateDefinition`1 update, FindOneAndUpdateOptions`2 options) in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 187
at OI.Service.CounterService.CounterService.CreateFirstSequenceUpDate() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\CounterService\CounterService.cs:line 36
at OI.Service.HangfireTask.CreatePackJob.CreatePackJobTask.<CreatePackJob>d__37.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\HangfireTask\CreatePackJob\CreatePackJobTask.cs:line 112