PackingFoilTask.ExecuteUpdateDrug

// Job ID: #69aa16ff453766c31288ad03
using OI.Service.HangfireTask;

var packingFoilTask = Activate<PackingFoilTask>();
await packingFoilTask.ExecuteUpdateDrug(
    "67d9f6e2af648e0accf00131",
    FromJson<Drug>("{\"DrugName\":\"NEULACTIL 2.5mg TAB\",\"DrugCode\":\"NEL1\",\"Austr\":\"27524\",\"Supplier\":\"CLINECT PTY LTD\",\"Type\":\"Tablet\",\"Color\":\"yellow\",\"Shape\":\"round\",\"Marking\":\"XY-100\",\"Warning\":\"*May cause dizziness when standing up quickly*Do NOT stop taking this medication abruptly*May cause drowsiness and increase effects of alcohol. If affected do not drive a motor vehicle or operate machinery.\",\"Direction\":\"\",\"GenericCode\":\"PE24\",\"GenericName\":\"PERICIAZINE\",\"Presentation\":\"Are antipsychotic medications used in the treatment of mental illness - primarily schizophrenia.\",\"ImageId\":\"5f3a2daea0ba5d7c5079669c\",\"ImageSmallSizeId\":\"68f598205a506b941b5c7b50\",\"ImageName\":\"27524-C01-01-BL600.jpg\",\"AltBrand\":\"NEULACTIL\",\"DoNotCrush\":false,\"TradeName\":\"NEULACTIL\",\"Formulation\":\"TAB\",\"Strength\":\"2.5mg\",\"Schedule\":\"4\",\"PackSize\":100,\"IsCytotoxic\":false,\"Authorized\":0,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":1,\"Description\":\"yellow round NEULACTIL\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"67d9f6e2af648e0accf00131\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"OriginValues\":\"{\\"Authorized\\":0,\\"ShelfLife\\":0,\\"Route\\":null}\",\"Usage\":0,\"DrugFullName\":\"NEULACTIL 2.5mg TAB\",\"MedicationFullDetails\":\"NEULACTIL 2.5mg TAB - PERICIAZINE (NEL1)\",\"Id\":\"5f0e69e0a0ba5db368a148ba\",\"CreatedDate\":\"2020-07-15T02:28:37.027Z\",\"CreatedUserId\":\"5e7457052a22160c3cf31edb\",\"LastUpdateUserId\":\"67eb2b1f08efed0b7099fd06\",\"LastUpdateDate\":\"2026-03-05T23:51:27.0632061Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"));
CurrentCulture
"en-US"
CurrentUICulture
"en-US"

State

3/5/2026 11:52:25 PM (+54.737s) Failed

An exception occurred during performance of the job.

MongoDB.Bson.BsonSerializationException

An error occurred while serializing the DateCeased property of class OI.Domain.Prescription: Exception of type 'System.OutOfMemoryException' was thrown.

MongoDB.Bson.BsonSerializationException: An error occurred while serializing the DateCeased property of class OI.Domain.Prescription: Exception of type 'System.OutOfMemoryException' was thrown. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at lambda_method(Closure , Object )
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeNormalMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap)
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap)
   --- End of inner exception stack trace ---
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap)
   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

+4.095s Processing

Server:
ip-0a000868:3732
Worker:
d91ec854

+5ms Enqueued

Queue:
default

3/5/2026 11:51:27 PM Created