PackingFoilTask.ExecuteUpdateDrug

// Job ID: #6893e3b65f3c04c71e9f93a1
using OI.Service.HangfireTask;

var packingFoilTask = Activate<PackingFoilTask>();
await packingFoilTask.ExecuteUpdateDrug(
    "65f2569216f53f0d606afc0d",
    FromJson<Drug>("{\"DrugName\":\"PERINDOPRIL AMLODIPINE (APX) 10mg/5mg TAB\",\"DrugCode\":\"PEAM7\",\"Austr\":\"200817\",\"Supplier\":\"ARROTEX PHARMACEUTICALS P\",\"Type\":\"Tablet\",\"Color\":\"\",\"Shape\":\"\",\"Marking\":\"\",\"Warning\":\"*Do NOT stop taking this medication abruptly*DO NOT TAKE POTASSIUM while being treated with this medicine unless advised by your Doctor**May affect alertness and/or co-ordination. If affected, do not drive or operate machinery*May cause dizziness when standing up quickly*Certain foods and fruit juices should be avoided while being treated with this medicineSpecial handling and disposal required - ask your Pharmacistswallowed wholePREGNANCY WARNING - Category D\",\"Direction\":\"\",\"GenericCode\":\"PEAM3\",\"GenericName\":\"PERINDOPRIL ARG/AMLODIPINE\",\"Presentation\":\"\",\"ImageId\":\"\",\"AltBrand\":\"COVERAM 10/5, REAPTAN 10/5, DEFLECTUM 10/5, DYNOVAL 10/5, PERINDOPRIL AMLODIPINE (APO), PERINDOPRIL AMLODIPINE (BLOOMS, PERINDOPRIL AMLODIPINE (CMART), PERINDOPRIL AMLODIPINE (TW), PERINDOPRIL AMLODIPINE (APX), PERINDOPRIL AMLODIPINE (WGR)\",\"DoNotCrush\":true,\"TradeName\":\"PERINDOPRIL AMLODIPINE (APX)\",\"Formulation\":\"TAB\",\"Strength\":\"10mg/5mg\",\"Schedule\":\"4\",\"PackSize\":30,\"IsCytotoxic\":false,\"Authorized\":0,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":1,\"Description\":\"white triangle \\"10/5\\"\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"65f2569216f53f0d606afc0d\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"OriginValues\":\"{\\"ImageId\\":null,\\"ShelfLife\\":0,\\"Description\\":\\"\\",\\"Route\\":null}\",\"Usage\":0,\"DrugFullName\":\"PERINDOPRIL AMLODIPINE (APX) 10mg/5mg TAB\",\"UpdateImageUserId\":\"66024f2ca5ab8f030cc8a61f\",\"MedicationFullDetails\":\"PERINDOPRIL AMLODIPINE (APX) 10mg/5mg TAB - PERINDOPRIL ARG/AMLODIPINE (PEAM7)\",\"Id\":\"64d971c1f65a880b38d1ab8d\",\"CreatedDate\":\"2023-08-14T00:13:53.661Z\",\"CreatedUserId\":\"\",\"LastUpdateUserId\":\"66024f2ca5ab8f030cc8a61f\",\"LastUpdateDate\":\"2025-08-06T23:22:30.1694188Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"));
CurrentCulture
"en-US"
CurrentUICulture
"en-US"

State

8/6/2025 11:23:08 PM (+37.781s) 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

+592ms Processing

Server:
ip-0a0008f6:2572
Worker:
3de9dbb4

+6ms Enqueued

Queue:
default

8/6/2025 11:22:30 PM Created