app.log.2026-02-23

Latest changes applied: DoNotGenerate Invoice Fix (2026-02-26)
2026-03-02 15:57:45,103 - 23206 - src.utils.log - INFO - πŸ“₯ Inserting into ServiceCore.WorkOrderAutoGenerationServices: 0 rows in batches of 25000 (Thread: AnyIO worker thread) - __SPLIT__
2026-03-02 15:57:45,795 - 23206 - src.utils.log - INFO - βœ… All 0 rows inserted successfully into ServiceCore.WorkOrderAutoGenerationServices in 0 batches - __SPLIT__
2026-03-02 15:57:46,435 - 23206 - src.utils.log - INFO - WorkOrderAutoGenerationServices inserted to dream DB - __SPLIT__
2026-03-02 15:57:47,076 - 23206 - src.utils.log - INFO - πŸ“₯ Inserting into ServiceCore.WorkOrderAutoGenerationServices: 2172 rows in batches of 25000 (Thread: AnyIO worker thread) - __SPLIT__
2026-03-02 15:57:47,751 - 23206 - src.utils.log - INFO - πŸ“€ Inserting batch 1/1 (0 to 2172) into ServiceCore.WorkOrderAutoGenerationServices - __SPLIT__
2026-03-02 15:57:52,785 - 23206 - src.utils.log - INFO - βœ… All 2172 rows inserted successfully into ServiceCore.WorkOrderAutoGenerationServices in 1 batches - __SPLIT__
2026-03-02 15:57:53,435 - 23206 - src.utils.log - INFO - WorkOrderAutoGenerationServices inserted to dream DB - __SPLIT__
2026-03-02 15:57:54,369 - 23206 - src.utils.log - INFO - πŸ“ Executing: UPDATE ServiceCore.GenerateWorkOrderHistory
                        SET Status = 'Completed' WHERE GenerateWorkOrderHistoryId = 23206;... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-02 15:57:55,050 - 23206 - src.utils.log - INFO - βœ… Command executed successfully - __SPLIT__
2026-03-02 15:57:55,691 - 23206 - src.utils.log - INFO - Sequential work order generation successful - __SPLIT__
2026-03-02 15:57:56,341 - 23206 - src.utils.log - INFO - Time took to perform operation: 956.25 - __SPLIT__
2026-03-02 15:57:56,981 - 23206 - src.utils.log - INFO - πŸ“ Executing: UPDATE ServiceCore.GenerateWorkOrderHistory
                        SET Status = 'Completed' WHERE GenerateWorkOrderHistoryId = 23206;... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-02 15:57:57,658 - 23206 - src.utils.log - INFO - βœ… Command executed successfully - __SPLIT__
2026-03-02 15:57:58,306 - 23206 - src.utils.log - INFO - πŸ“ Executing: UPDATE ServiceCore.GenerateWorkOrderHistory SET
                    WorkOrderStatusDateTime = '2026-03-02 10:57:58.306' WHERE  
                    GenerateWorkOrderHistoryId = 23206;... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-02 15:57:58,984 - 23206 - src.utils.log - INFO - βœ… Command executed successfully - __SPLIT__
2026-03-03 03:57:53,685 - 56014 - src.utils.log - INFO - ParallelProcessing=False GenerateWorkOrderHistoryId=56014 - __SPLIT__
2026-03-03 03:57:55,650 - 56014 - src.utils.log - INFO - Sequential Work order generation algo started for GenerateWorkOrderHistoryId: 56014 - __SPLIT__
2026-03-03 03:57:56,297 - 56014 - src.utils.log - INFO - βœ… Successfully connected to database - __SPLIT__
2026-03-03 03:57:56,929 - 56014 - src.utils.log - INFO - πŸ” Fetching data: SELECT ConnectionStringName FROM Common.CompanyTenantMaster WHERE 
        CompanyKey  = 'Samsung'... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:57:57,769 - 56014 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-03-03 03:57:58,407 - 56014 - src.utils.log - INFO - Connection string not found connecting to common DB - __SPLIT__
2026-03-03 03:57:59,033 - 56014 - src.utils.log - INFO - πŸ“ Executing: UPDATE ServiceCore.GenerateWorkOrderHistory
                        SET Status = 'InProgress' WHERE GenerateWorkOrderHistoryId = 56014;... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:57:59,689 - 56014 - src.utils.log - INFO - βœ… Command executed successfully - __SPLIT__
2026-03-03 03:58:00,321 - 56014 - src.utils.log - INFO - πŸ” Fetching data:  
    SELECT sss.RecurringServicePrice, gw.StartDate, gw.EndDate, gw.CreatedBy AS NewCreatedBy, gw.RouteIds, ss.* FROM 
    ServiceCore.GenerateWorkOrderHistory gw JOIN ServiceCore.ServiceSetup ss ON gw.CompanyId = ss.CompanyId AND (
    (ss.NextGenerationDate <= gw.EndDate AND ss.NextGenerationDate >= gw.StartDate) OR ss.NextGenerationDate IS NULL) 
    AND (gw.AccountNumber IS NULL OR ss.AccountNumber = gw.AccountNumber) AND (gw.ServiceSetupId IS NULL OR 
    ss.ServiceSetupId = gw.ServiceSetupId)AND (gw.RouteIds IS NULL OR ss.RouteMasterId IN (SELECT CAST(value AS INT) FROM 
    STRING_SPLIT((SELECT RouteIds FROM ServiceCore.GenerateWorkOrderHistory WHERE GenerateWorkOrderHistoryid = 
    56014), ',' )) OR ss.InitialRouteId IN ( SELECT CAST(value AS INT) FROM STRING_SPLIT((SELECT RouteIds 
    FROM ServiceCore.GenerateWorkOrderHistory WHERE GenerateWorkOrderHistoryid = 56014), ','))) JOIN (SELECT 
    SUM(Price) AS RecurringServicePrice, ServiceSetupId FROM ServiceCore.ServiceSetupServices GROUP BY ServiceSetupId
    ) sss ON sss.ServiceSetupId = ss.ServiceSetupId WHERE gw.GenerateWorkOrderHistoryid = 56014 AND 
    ss.FrequencyScheduleId IS NOT NULL AND ss.IsActive = 1 AND ss.IsDeleted = 0 AND ss.Status <> 'Canceled';... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:01,071 - 56014 - src.utils.log - INFO - βœ… Fetched 40 rows - __SPLIT__
2026-03-03 03:58:01,705 - 56014 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.GenerateWorkOrderHistory gwoh WHERE GenerateWorkOrderHistoryId = 56014;... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:02,375 - 56014 - src.utils.log - INFO - βœ… Fetched 1 rows - __SPLIT__
2026-03-03 03:58:03,019 - 56014 - src.utils.log - INFO - FrequencyScheduleId missing for setups: []: Ignored these setups - __SPLIT__
2026-03-03 03:58:03,661 - 56014 - src.utils.log - INFO - πŸ” Fetching data: 
        SELECT  fsd.IntervalDays, fs.CreatedDate ,f.FrequencyId , fs.FrequencyScheduleId,  f.[SysName], f.FrequencyValue, 
        f.YearlyOccurrence , fs.ScheduleFormat,fsd.Days, fsd.Weeks, fsd.Months,fsc.[Month] as sch_months, fsd.StartMonth , 
        fsd.DateDay,fsd.DateMonth FROM [ServiceCore].[FrequencyMaster] f inner join [ServiceCore].[FrequencySchedule] fs 
        on fs.FrequencyId = f.FrequencyId left join ServiceCore.FrequencyScheduleCycle fsc on 
        fsc.FrequencyScheduleId = fs.FrequencyScheduleId left join [ServiceCore].[FrequencyScheduleDetail] fsd on 
        fsd.FrequencyScheduleId = fs.FrequencyScheduleId WHERE fsd.FrequencyScheduleId in (14691, 14852, 14853, 14694, 13959, 14822, 14915, 14826, 14921, 14827, 14829, 14828, 14708, 14869, 14870, 14714, 14845)... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:04,367 - 56014 - src.utils.log - INFO - βœ… Fetched 347 rows - __SPLIT__
2026-03-03 03:58:05,003 - 56014 - src.utils.log - INFO - Found the Setups and Frequencies - __SPLIT__
2026-03-03 03:58:05,637 - 56014 - src.utils.log - INFO - Inside work order function - __SPLIT__
2026-03-03 03:58:06,272 - 56014 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.ServiceSetupSubWorkOrder ssswo WHERE 
     ssswo.ServiceSetupId  in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227);... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:06,953 - 56014 - src.utils.log - INFO - βœ… Fetched 10 rows - __SPLIT__
2026-03-03 03:58:07,588 - 56014 - src.utils.log - INFO - πŸ” Fetching data: select ServiceDate, ServiceSetupId from serviceCore.WorkOrder wo inner join 
        ServiceCore.WorkOrderStatus wos on wo.WoStatusId = wos.WoStatusId where  ServiceDate >= '2026-04-01 00:00:00' and 
        ServiceDate <= '2026-04-30 00:00:00' and ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227) and wo.IsActive = 1 and wos.Name 
        not in ('Void', 'Cancelled');... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:08,542 - 56014 - src.utils.log - INFO - βœ… Fetched 1 rows - __SPLIT__
2026-03-03 03:58:09,335 - 56014 - src.utils.log - INFO - Generating work orders for setup: 11444 - __SPLIT__
2026-03-03 03:58:09,966 - 56014 - src.utils.log - INFO - Error processing schedule ID 14694: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:10,601 - 56014 - src.utils.log - INFO - Generating work orders for setup: 11452 - __SPLIT__
2026-03-03 03:58:11,232 - 56014 - src.utils.log - INFO - Error processing schedule ID 13959: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:11,858 - 56014 - src.utils.log - INFO - Generating work orders for setup: 11455 - __SPLIT__
2026-03-03 03:58:12,491 - 56014 - src.utils.log - INFO - Error processing schedule ID 14694: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:13,117 - 56014 - src.utils.log - INFO - Generating work orders for setup: 11456 - __SPLIT__
2026-03-03 03:58:13,746 - 56014 - src.utils.log - INFO - Error processing schedule ID 14694: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:14,377 - 56014 - src.utils.log - INFO - Generating work orders for setup: 11469 - __SPLIT__
2026-03-03 03:58:15,013 - 56014 - src.utils.log - INFO - Error processing schedule ID 13959: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:15,637 - 56014 - src.utils.log - INFO - Generating work orders for setup: 11873 - __SPLIT__
2026-03-03 03:58:16,269 - 56014 - src.utils.log - INFO - Error processing schedule ID 13959: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:16,906 - 56014 - src.utils.log - INFO - Generating work orders for setup: 22663 - __SPLIT__
2026-03-03 03:58:17,537 - 56014 - src.utils.log - INFO - Error processing schedule ID 14714: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:18,172 - 56014 - src.utils.log - INFO - Generating work orders for setup: 84212 - __SPLIT__
2026-03-03 03:58:18,806 - 56014 - src.utils.log - INFO - Error processing schedule ID 13959: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:19,438 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95052 - __SPLIT__
2026-03-03 03:58:20,064 - 56014 - src.utils.log - INFO - Error processing schedule ID 14915: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:20,695 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95063 - __SPLIT__
2026-03-03 03:58:21,614 - 56014 - src.utils.log - INFO - Error processing schedule ID 14915: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:22,258 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95064 - __SPLIT__
2026-03-03 03:58:22,900 - 56014 - src.utils.log - INFO - Error processing schedule ID 14915: cannot access local variable 'sorted_service_dates' where it is not associated with a value - __SPLIT__
2026-03-03 03:58:23,547 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95226 - __SPLIT__
2026-03-03 03:58:24,386 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95227 - __SPLIT__
2026-03-03 03:58:25,237 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95232 - __SPLIT__
2026-03-03 03:58:25,885 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95236 - __SPLIT__
2026-03-03 03:58:26,538 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95249 - __SPLIT__
2026-03-03 03:58:27,193 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95288 - __SPLIT__
2026-03-03 03:58:27,898 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95290 - __SPLIT__
2026-03-03 03:58:28,550 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95351 - __SPLIT__
2026-03-03 03:58:29,215 - 56014 - src.utils.log - INFO - Generating work orders for setup: 95370 - __SPLIT__
2026-03-03 03:58:29,875 - 56014 - src.utils.log - INFO - πŸ” Fetching data: SELECT * FROM COMMON.RangeofTime where RangeofTimeId in (11463.0, 11437.0, 11398.0, 11343.0);... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:30,548 - 56014 - src.utils.log - INFO - βœ… Fetched 4 rows - __SPLIT__
2026-03-03 03:58:31,234 - 56014 - src.utils.log - INFO - Updating Next Gen Date - __SPLIT__
2026-03-03 03:58:31,895 - 56014 - src.utils.log - INFO - πŸ” Fetching data: SELECT WoStatusId From ServiceCore.WorkOrderStatus wos where CompanyId=145 and 
    [SysName]= 'Incomplete' ;... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:32,567 - 56014 - src.utils.log - INFO - βœ… Fetched 1 rows - __SPLIT__
2026-03-03 03:58:33,211 - 56014 - src.utils.log - INFO - Deleting duplicate records - __SPLIT__
2026-03-03 03:58:33,858 - 56014 - src.utils.log - INFO - Running deletes SEQUENTIALLY… - __SPLIT__
2026-03-03 03:58:34,498 - 56014 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationServices 
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:35,506 - 56014 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-03-03 03:58:36,143 - 56014 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationCrews 
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:36,856 - 56014 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-03-03 03:58:37,488 - 56014 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationSalesPersonCommission 
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:38,162 - 56014 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-03-03 03:58:38,792 - 56014 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationAppliedDiscount
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:39,501 - 56014 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-03-03 03:58:40,137 - 56014 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.SetupAutoGenerationSourceMapping
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:40,869 - 56014 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-03-03 03:58:41,504 - 56014 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.SubWorkOrderAutoGeneration
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:42,236 - 56014 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-03-03 03:58:42,866 - 56014 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationCommissionAdjustment
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:43,536 - 56014 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-03-03 03:58:44,163 - 56014 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGeneration 
        WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
           (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:45,171 - 56014 - src.utils.log - ERROR - ❌ Error in deleting records: (pyodbc.IntegrityError) ('23000', '[23000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The DELETE statement conflicted with the REFERENCE constraint "FK_WorkorderAutoGenerationServices_WorkOrderAutoGeneration". The conflict occurred in database "pstrmcore", table "ServiceCore.WorkOrderAutoGenerationServices", column \'WorkOrderAutoGenerationId\'. (547) (SQLExecDirectW)')
[SQL: 
        DELETE FROM ServiceCore.WorkOrderAutoGeneration 
        WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        ]
(Background on this error at: https://sqlalche.me/e/20/gkpj) - __SPLIT__
2026-03-03 03:58:45,798 - 56014 - src.utils.log - ERROR - ❌ delete_records_from_db failed after 1 attempts: (pyodbc.IntegrityError) ('23000', '[23000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The DELETE statement conflicted with the REFERENCE constraint "FK_WorkorderAutoGenerationServices_WorkOrderAutoGeneration". The conflict occurred in database "pstrmcore", table "ServiceCore.WorkOrderAutoGenerationServices", column \'WorkOrderAutoGenerationId\'. (547) (SQLExecDirectW)')
[SQL: 
        DELETE FROM ServiceCore.WorkOrderAutoGeneration 
        WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        ]
(Background on this error at: https://sqlalche.me/e/20/gkpj) - __SPLIT__
2026-03-03 03:58:46,426 - 56014 - src.utils.log - INFO - πŸ“ Executing: UPDATE ServiceCore.GenerateWorkOrderHistory
                        SET Status = 'Completed' WHERE GenerateWorkOrderHistoryId = 56014;... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:47,081 - 56014 - src.utils.log - INFO - βœ… Command executed successfully - __SPLIT__
2026-03-03 03:58:47,712 - 56014 - src.utils.log - INFO - Time took to perform operation: 51.42 - __SPLIT__
2026-03-03 03:58:48,343 - 56014 - src.utils.log - INFO - Error in Sequential work order generation Error: (pyodbc.IntegrityError) ('23000', '[23000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The DELETE statement conflicted with the REFERENCE constraint "FK_WorkorderAutoGenerationServices_WorkOrderAutoGeneration". The conflict occurred in database "pstrmcore", table "ServiceCore.WorkOrderAutoGenerationServices", column \'WorkOrderAutoGenerationId\'. (547) (SQLExecDirectW)')
[SQL: 
        DELETE FROM ServiceCore.WorkOrderAutoGeneration 
        WHERE ServiceSetupId in (95232, 95226, 95236, 84229, 22663, 95370, 84239, 84240, 95249, 84247, 84504, 84508, 84636, 84383, 95007, 84513, 84515, 84273, 11444, 95288, 95290, 11452, 11455, 11456, 94923, 95052, 11469, 94801, 84435, 95063, 95064, 84444, 11873, 84456, 84457, 34285, 84212, 95351, 95098, 95227)
        ]
(Background on this error at: https://sqlalche.me/e/20/gkpj) - __SPLIT__
2026-03-03 03:58:49,248 - 56014 - src.utils.log - INFO - πŸ“ Executing: UPDATE ServiceCore.GenerateWorkOrderHistory
                        SET Status = 'Completed' WHERE GenerateWorkOrderHistoryId = 56014;... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:49,910 - 56014 - src.utils.log - INFO - βœ… Command executed successfully - __SPLIT__
2026-03-03 03:58:50,541 - 56014 - src.utils.log - INFO - πŸ“ Executing: UPDATE ServiceCore.GenerateWorkOrderHistory SET
                    WorkOrderStatusDateTime = '2026-03-02 22:58:50.541' WHERE  
                    GenerateWorkOrderHistoryId = 56014;... (Thread: AnyIO worker thread) - __SPLIT__
2026-03-03 03:58:51,200 - 56014 - src.utils.log - INFO - βœ… Command executed successfully - __SPLIT__