PackingFoilTask.ExecuteUpdateDrug

// Job ID: #68d37e60f236ac2c3d08c681
using OI.Service.HangfireTask;

var packingFoilTask = Activate<PackingFoilTask>();
await packingFoilTask.ExecuteUpdateDrug(
    "65f2569216f53f0d606afc0d",
    FromJson<Drug>("{\"DrugName\":\"RIVARELTO 15mg TAB\",\"DrugCode\":\"RIVA71\",\"Austr\":\"333036\",\"Supplier\":\"ARROTEX PHARMACEUTICALS P\",\"Type\":\"Tablet\",\"Color\":\"\",\"Shape\":\"\",\"Marking\":\"\",\"Warning\":\"with or soon after food.*Do not take ASPIRIN or ANTI-INFLAMMATORY medicines unless advised by your Doctor\",\"Direction\":\"\",\"GenericCode\":\"RIVA72\",\"GenericName\":\"RIVAROXABAN\",\"Presentation\":\"Are anticoagulants that block the activity of clotting factor Xa and prevents blood clots developing or getting worse.\",\"ImageId\":\"\",\"AltBrand\":\"RIVARELTO\",\"DoNotCrush\":false,\"TradeName\":\"RIVARELTO\",\"Formulation\":\"TAB\",\"Strength\":\"15mg\",\"Schedule\":\"4\",\"PackSize\":30,\"IsCytotoxic\":false,\"Authorized\":2,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":1,\"Description\":\"\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"65f2569216f53f0d606afc0d\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"OriginValues\":\"{\\"ImageId\\":null,\\"Authorized\\":0,\\"ShelfLife\\":0,\\"Route\\":null}\",\"Usage\":0,\"DrugFullName\":\"RIVARELTO 15mg TAB\",\"UpdateImageUserId\":\"6785b2ca08efed02d494383e\",\"MedicationFullDetails\":\"RIVARELTO 15mg TAB - RIVAROXABAN (RIVA71)\",\"Id\":\"68933963d608d9e2843a2c01\",\"CreatedDate\":\"2025-08-06T11:15:47.332Z\",\"CreatedUserId\":\"\",\"LastUpdateUserId\":\"6785b2ca08efed02d494383e\",\"LastUpdateDate\":\"2025-09-24T05:15:12.8487639Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"));
CurrentCulture
"en-US"
CurrentUICulture
"en-US"

State

9/24/2025 5:16:39 AM (+1m 19.657s) Failed

An exception occurred during performance of the job.

System.OutOfMemoryException

Exception of type 'System.OutOfMemoryException' was thrown.

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Collections.Generic.List`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeClass(BsonSerializationContext context, BsonSerializationArgs args, TClass document)
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Serialize(BsonSerializationContext context, BsonSerializationArgs args, TClass value)
   at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Serialize[TValue](IBsonSerializer`1 serializer, BsonSerializationContext context, TValue value)
   at MongoDB.Bson.Serialization.Serializers.EnumerableSerializerBase`2.Serialize(BsonSerializationContext context, BsonSerializationArgs args, TValue value)
   at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Serialize[TValue](IBsonSerializer`1 serializer, BsonSerializationContext context, TValue value)
   at MongoDB.Driver.OperatorUpdateDefinition`2.Render(IBsonSerializer`1 documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)
   at MongoDB.Driver.MongoCollectionImpl`1.ConvertWriteModelToWriteRequest(WriteModel`1 model, Int32 index)
   at System.Linq.Enumerable.<SelectIterator>d__5`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at MongoDB.Driver.Core.Operations.BulkMixedWriteOperation..ctor(CollectionNamespace collectionNamespace, IEnumerable`1 requests, MessageEncoderSettings messageEncoderSettings)
   at MongoDB.Driver.MongoCollectionImpl`1.CreateBulkWriteOperation(IClientSessionHandle session, IEnumerable`1 requests, BulkWriteOptions options)
   at MongoDB.Driver.MongoCollectionImpl`1.<BulkWriteAsync>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MongoDB.Driver.MongoCollectionImpl`1.<UsingImplicitSessionAsync>d__107`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at OI.Data.MongoDBRepository`1.<BulkWriteAsync>d__15.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 166
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at OI.Service.HangfireTask.PackingFoilTask.<BulkUpdate>d__7.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\HangfireTask\PackingFoil\PackingFoilTask.cs:line 89
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at OI.Service.HangfireTask.PackingFoilTask.<ExecuteUpdateDrug>d__6.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\HangfireTask\PackingFoil\PackingFoilTask.cs:line 69

+6.465s Processing

Server:
ip-0a0006e8:3176
Worker:
64dcbd09

+6ms Enqueued

Queue:
default

9/24/2025 5:15:12 AM Created