PackingFoilTask.ExecuteUpdateDrug

// Job ID: #690039d119352da607c97cf3
using OI.Service.HangfireTask;

var packingFoilTask = Activate<PackingFoilTask>();
await packingFoilTask.ExecuteUpdateDrug(
    "6840d2a408efed0f0c610cb4",
    FromJson<Drug>("{\"DrugName\":\"DULOXETINE (APO) 30mg EC-CAP\",\"DrugCode\":\"DULO5\",\"Austr\":\"217985\",\"Supplier\":\"APOTEX PTY LTD\",\"Type\":\"EC-Capsule\",\"Color\":\"blue opaque and white opaque\",\"Shape\":\"\",\"Marking\":\"A\",\"Warning\":\"*May cause drowsiness and increase effects of alcohol. If affected do not drive a motor vehicle or operate machinery.*Ask your Doctor or Pharmacist before using other medicines including over-the-counter or any health products*Do NOT stop taking this medication abruptly*May affect alertness and/or co-ordination. If affected, do not drive or operate machineryswallowed whole\",\"Direction\":\"\",\"GenericCode\":\"DULO1\",\"GenericName\":\"DULOXETINE\",\"Presentation\":\"\",\"ImageId\":\"5f3a2dbca0ba5d7c50796c4f\",\"ImageSmallSizeId\":\"68f599205a506b941b5c8d3e\",\"ImageName\":\"217985-C01-01-BL600.jpg\",\"AltBrand\":\"CYMBALTA, ANDEPRA, DULOXETINE (APO), DULOXETINE (CHEM-MART), DULOXETINE (TW), DRULOX, DULOXETINE (DRLA), COPERIN, DULOXETINE (GH), DEOTINE 30, DULOXETINE (RBX), DULOXETINE (AN), DULOXETINE (PHARMACOR), DEPRETA, DULOXETINE (SZ), TIXOL 30, DYTREX, DULOXETINE 30 (SANDOZ), DULOXETINE (SANDOZ), DULOXECOR, DULOXETINE (BLOOMS)\",\"DoNotCrush\":true,\"TradeName\":\"DULOXETINE (APO)\",\"Formulation\":\"EC-CAP\",\"Strength\":\"30mg\",\"Schedule\":\"4\",\"PackSize\":28,\"IsCytotoxic\":false,\"Authorized\":2,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":1,\"Description\":\"blue opaque and white opaque  A\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"6840d2a408efed0f0c610cb4\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"OriginValues\":\"{\\"Authorized\\":0,\\"ShelfLife\\":0,\\"Route\\":null}\",\"Usage\":1,\"DrugFullName\":\"DULOXETINE (APO) 30mg EC-CAP\",\"MedicationFullDetails\":\"DULOXETINE (APO) 30mg EC-CAP - DULOXETINE (DULO5)\",\"Id\":\"5f0e69e0a0ba5db368a16c70\",\"CreatedDate\":\"2020-07-15T02:28:44.976Z\",\"CreatedUserId\":\"5e7457052a22160c3cf31edb\",\"LastUpdateUserId\":\"6840f627a7ab95045cb85f69\",\"LastUpdateDate\":\"2025-10-28T03:34:41.2483886Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"));
CurrentCulture
"en-US"
CurrentUICulture
"en-US"

State

10/28/2025 3:34:54 AM (+11.965s) Failed

An exception occurred during performance of the job.

System.FormatException

An error occurred while deserializing the Patient property of class OI.Domain.PackingFoil: Exception of type 'System.OutOfMemoryException' was thrown.

System.FormatException: An error occurred while deserializing the Patient property of class OI.Domain.PackingFoil: Exception of type 'System.OutOfMemoryException' was thrown. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
   at System.Text.UTF8Encoding.GetString(Byte[] bytes, Int32 index, Int32 count)
   at MongoDB.Bson.IO.Utf8Helper.DecodeUtf8String(Byte[] bytes, Int32 index, Int32 count, UTF8Encoding encoding)
   at MongoDB.Bson.IO.Utf8NameDecoder.Decode(BsonStream stream, UTF8Encoding encoding)
   at MongoDB.Bson.IO.BsonBinaryReader.ReadName(INameDecoder nameDecoder)
   at MongoDB.Bson.IO.IBsonReaderExtensions.FindElement(IBsonReader reader, String name)
   at MongoDB.Bson.Serialization.Conventions.StandardDiscriminatorConvention.GetActualType(IBsonReader bsonReader, Type nominalType)
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
   at MongoDB.Bson.Serialization.Serializers.SerializerBase`1.MongoDB.Bson.Serialization.IBsonSerializer.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
   at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize(IBsonSerializer serializer, BsonDeserializationContext context)
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.DeserializeMemberValue(BsonDeserializationContext context, BsonMemberMap memberMap)
   --- End of inner exception stack trace ---
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.DeserializeMemberValue(BsonDeserializationContext context, BsonMemberMap memberMap)
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.DeserializeClass(BsonDeserializationContext context)
   at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
   at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Deserialize[TValue](IBsonSerializer`1 serializer, BsonDeserializationContext context)
   at MongoDB.Driver.Core.Operations.CursorBatchDeserializationHelper.DeserializeBatch[TDocument](RawBsonArray batch, IBsonSerializer`1 documentSerializer, MessageEncoderSettings messageEncoderSettings)
   at MongoDB.Driver.Core.Operations.AsyncCursor`1.CreateCursorBatch(BsonDocument result)
   at MongoDB.Driver.Core.Operations.AsyncCursor`1.ExecuteGetMoreCommand(IChannelHandle channel, CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Operations.AsyncCursor`1.GetNextBatch(CancellationToken cancellationToken)
   at MongoDB.Driver.Core.Operations.AsyncCursor`1.MoveNext(CancellationToken cancellationToken)
   at MongoDB.Driver.IAsyncCursorExtensions.ToList[TDocument](IAsyncCursor`1 source, CancellationToken cancellationToken)
   at OI.Data.MongoDBRepository`1.<>c__DisplayClass23_0.<<GetAsync>b__0>d.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 248
--- 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.<GetAsync>d__23.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 244
--- 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.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 55

+1.401s Processing

Server:
ip-0a0008f6:2604
Worker:
6124a6ea

+10ms Enqueued

Queue:
default

10/28/2025 3:34:41 AM Created