app.log.2026-09-28

Latest changes applied: id fetch fix (2026-10-10)
2026-10-06 09:13:39,113 - 13118 - src.utils.log - INFO - ✅ Records deleted successfully - __SPLIT__
2026-10-06 09:13:39,169 - 13118 - src.utils.log - INFO - 🗑️ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationAppliedDiscount
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34760
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:39,532 - 13118 - src.utils.log - INFO - ✅ Records deleted successfully - __SPLIT__
2026-10-06 09:13:39,583 - 13118 - src.utils.log - INFO - 🗑️ Deleting records: 
        DELETE FROM ServiceCore.SetupAutoGenerationSourceMapping
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34760
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:39,941 - 13118 - src.utils.log - INFO - ✅ Records deleted successfully - __SPLIT__
2026-10-06 09:13:39,995 - 13118 - src.utils.log - INFO - 🗑️ Deleting records: 
        DELETE FROM ServiceCore.SubWorkOrderAutoGeneration
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34760
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:40,352 - 13118 - src.utils.log - INFO - ✅ Records deleted successfully - __SPLIT__
2026-10-06 09:13:40,408 - 13118 - src.utils.log - INFO - 🗑️ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationCommissionAdjustment
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34760
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:40,745 - 13118 - src.utils.log - INFO - ✅ Records deleted successfully - __SPLIT__
2026-10-06 09:13:40,794 - 13118 - src.utils.log - INFO - 🗑️ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGeneration 
        WHERE ServiceSetupId = 34760
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:41,432 - 13118 - src.utils.log - INFO - ✅ Records deleted successfully - __SPLIT__
2026-10-06 09:13:41,557 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT CompanyRoundingLevel,
    CompanyRoundingMethod  FROM common.CompanyConfiguration cc WHERE  
    CompanyId = 135... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:41,887 - 13118 - src.utils.log - INFO - ✅ Fetched 1 rows - __SPLIT__
2026-10-06 09:13:41,945 - 13118 - src.utils.log - INFO - Checking if all rows exist in parent table or not - __SPLIT__
2026-10-06 09:13:42,000 - 13118 - src.utils.log - INFO - 📥 Inserting into ServiceCore.WorkOrderAutoGeneration: 16 rows in batches of 25000 (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:42,380 - 13118 - src.utils.log - INFO - 📤 Inserting batch 1/1 (0 to 16) into ServiceCore.WorkOrderAutoGeneration - __SPLIT__
2026-10-06 09:13:44,045 - 13118 - src.utils.log - INFO - ✅ All 16 rows inserted successfully into ServiceCore.WorkOrderAutoGeneration in 1 batches - __SPLIT__
2026-10-06 09:13:44,105 - 13118 - src.utils.log - INFO - 🔍 Fetching data: Select TOP 16 WorkOrderAutoGenerationId, ServiceSetupId , ModifiedBy,
    ModifiedDate, IsInitial, ServiceDate From ServiceCore.WorkOrderAutoGeneration WHERE ModifiedDate='2026-10-01 18:08:03.745'
    and ServiceSetupId = 34760... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:44,461 - 13118 - src.utils.log - INFO - ✅ Fetched 16 rows - __SPLIT__
2026-10-06 09:13:44,523 - 13118 - src.utils.log - INFO - Id's of work order inserted to DB: [2790153 2790154 2790155 2790156 2790157 2790158 2790159 2790160 2790161
 2790162 2790163 2790164 2790165 2790166 2790167 2790168] - __SPLIT__
2026-10-06 09:13:44,600 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * from ServiceCore.ServiceSetupSubWorkOrder ssswo WHERE 
     ssswo.ServiceSetupId  = 34760;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:44,943 - 13118 - src.utils.log - INFO - ✅ Fetched 0 rows - __SPLIT__
2026-10-06 09:13:45,003 - 13118 - src.utils.log - INFO - Inside get_remaining_temp_tables - __SPLIT__
2026-10-06 09:13:45,058 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * from servicecore.serviceSetupServices sss where ServiceSetupId
                = 34760... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:45,398 - 13118 - src.utils.log - INFO - ✅ Fetched 1 rows - __SPLIT__
2026-10-06 09:13:45,456 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * from servicecore.ServiceSetupInitialServices sss where ServiceSetupId
                = 34760... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:45,796 - 13118 - src.utils.log - INFO - ✅ Fetched 0 rows - __SPLIT__
2026-10-06 09:13:45,859 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * from ServiceCore.ServiceSetupCrew ssc where ServiceSetupId
      = 34760... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:46,200 - 13118 - src.utils.log - INFO - ✅ Fetched 1 rows - __SPLIT__
2026-10-06 09:13:46,252 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * from ServiceCore.ServiceSetupSalesPersonCommission ssspc where 
    ServiceSetupId = 34760... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:46,593 - 13118 - src.utils.log - INFO - ✅ Fetched 0 rows - __SPLIT__
2026-10-06 09:13:46,647 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * from ServiceCore.ServiceSetupCommissionAdjustment ssspc where 
    ServiceSetupId = 34760... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:46,983 - 13118 - src.utils.log - INFO - ✅ Fetched 0 rows - __SPLIT__
2026-10-06 09:13:47,040 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * from ServiceCore.serviceSetupAppliedDiscount WHERE 
     ServiceSetupId  = 34760;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:47,380 - 13118 - src.utils.log - INFO - ✅ Fetched 0 rows - __SPLIT__
2026-10-06 09:13:47,439 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * from ServiceCore.SetupSourceMapping WHERE 
     ServiceSetupId  = 34760;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:47,780 - 13118 - src.utils.log - INFO - ✅ Fetched 0 rows - __SPLIT__
2026-10-06 09:13:47,830 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * FROM [ServiceCore].[CommunicationPreferencesServiceReportNotification] WITH(NOLOCK) WHERE 
        EntityType = 'Setup' AND ServiceSetupId = 34760;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:48,183 - 13118 - src.utils.log - INFO - ✅ Fetched 0 rows - __SPLIT__
2026-10-06 09:13:48,234 - 13118 - src.utils.log - INFO - 🔍 Fetching data: SELECT * From CRM.LeadNote WHERE RefType = 'Setup' and RefId = 34760;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:48,573 - 13118 - src.utils.log - INFO - ✅ Fetched 0 rows - __SPLIT__
2026-10-06 09:13:48,698 - 13118 - src.utils.log - INFO - Inside insert_data_in_temp_tables for work order generation - __SPLIT__
2026-10-06 09:13:48,749 - 13118 - src.utils.log - INFO - 📥 Empty dataframe of CRM.LeadNote: - __SPLIT__
2026-10-06 09:13:48,806 - 13118 - src.utils.log - INFO - leadNoteDf inserted to dream DB - __SPLIT__
2026-10-06 09:13:48,863 - 13118 - src.utils.log - INFO - 📥 Empty dataframe of ServiceCore.CommunicationPreferencesServiceReportNotification: - __SPLIT__
2026-10-06 09:13:48,925 - 13118 - src.utils.log - INFO - CommunicationPreferencesServiceReportNotification inserted to dream DB - __SPLIT__
2026-10-06 09:13:48,983 - 13118 - src.utils.log - INFO - 📥 Empty dataframe of ServiceCore.SetupAutoGenerationSourceMapping: - __SPLIT__
2026-10-06 09:13:49,037 - 13118 - src.utils.log - INFO - SetupAutoGenerationSourceMapping inserted to dream DB - __SPLIT__
2026-10-06 09:13:49,096 - 13118 - src.utils.log - INFO - 📥 Empty dataframe of ServiceCore.WorkOrderAutoGenerationAppliedDiscount: - __SPLIT__
2026-10-06 09:13:49,151 - 13118 - src.utils.log - INFO - WorkOrderAutoGenerationAppliedDiscount inserted to dream DB - __SPLIT__
2026-10-06 09:13:49,206 - 13118 - src.utils.log - INFO - 📥 Empty dataframe of ServiceCore.SubWorkOrderAutoGeneration: - __SPLIT__
2026-10-06 09:13:49,261 - 13118 - src.utils.log - INFO - SubWorkOrderAutoGeneration inserted to dream DB - __SPLIT__
2026-10-06 09:13:49,319 - 13118 - src.utils.log - INFO - 📥 Empty dataframe of ServiceCore.WorkOrderAutoGenerationCommissionAdjustment: - __SPLIT__
2026-10-06 09:13:49,380 - 13118 - src.utils.log - INFO - SubWorkOrderAutoGeneration inserted to dream DB - __SPLIT__
2026-10-06 09:13:49,436 - 13118 - src.utils.log - INFO - 📥 Empty dataframe of ServiceCore.WorkOrderAutoGenerationSalesPersonCommission: - __SPLIT__
2026-10-06 09:13:49,493 - 13118 - src.utils.log - INFO - WorkOrderAutoGenerationSalesPersonCommission_df inserted to dream DB - __SPLIT__
2026-10-06 09:13:49,586 - 13118 - src.utils.log - INFO - Checking if all rows exist in parent table or not - __SPLIT__
2026-10-06 09:13:49,641 - 13118 - src.utils.log - INFO - 🔍 Fetching data: 
            SELECT WorkOrderAutoGenerationId
            FROM ServiceCore.WorkOrderAutoGeneration
            WHERE WorkOrderAutoGenerationId IN (2790153, 2790154, 2790155, 2790156, 2790157, 2790158, 2790159, 2790160, 2790161, 2790162, 2790163, 2790164, 2790165, 2790166, 2790167, 2790168)
        ... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:49,975 - 13118 - src.utils.log - INFO - ✅ Fetched 16 rows - __SPLIT__
2026-10-06 09:13:50,036 - 13118 - src.utils.log - INFO - 📥 Inserting into ServiceCore.WorkOrderAutoGenerationCrews: 16 rows in batches of 25000 (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:50,378 - 13118 - src.utils.log - INFO - 📤 Inserting batch 1/1 (0 to 16) into ServiceCore.WorkOrderAutoGenerationCrews - __SPLIT__
2026-10-06 09:13:51,445 - 13118 - src.utils.log - INFO - ✅ All 16 rows inserted successfully into ServiceCore.WorkOrderAutoGenerationCrews in 1 batches - __SPLIT__
2026-10-06 09:13:51,508 - 13118 - src.utils.log - INFO - WorkOrderAutoGenerationCrews inserted to dream DB - __SPLIT__
2026-10-06 09:13:51,568 - 13118 - src.utils.log - INFO - 📥 Empty dataframe of ServiceCore.WorkOrderAutoGenerationServices: - __SPLIT__
2026-10-06 09:13:51,621 - 13118 - src.utils.log - INFO - WorkOrderAutoGenerationServices inserted to dream DB - __SPLIT__
2026-10-06 09:13:51,679 - 13118 - src.utils.log - INFO - Checking if all rows exist in parent table or not - __SPLIT__
2026-10-06 09:13:51,788 - 13118 - src.utils.log - INFO - 🔍 Fetching data: 
            SELECT WorkOrderAutoGenerationId
            FROM ServiceCore.WorkOrderAutoGeneration
            WHERE WorkOrderAutoGenerationId IN (2790153, 2790154, 2790155, 2790156, 2790157, 2790158, 2790159, 2790160, 2790161, 2790162, 2790163, 2790164, 2790165, 2790166, 2790167, 2790168)
        ... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:52,127 - 13118 - src.utils.log - INFO - ✅ Fetched 16 rows - __SPLIT__
2026-10-06 09:13:52,182 - 13118 - src.utils.log - INFO - 📥 Inserting into ServiceCore.WorkOrderAutoGenerationServices: 16 rows in batches of 25000 (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:52,531 - 13118 - src.utils.log - INFO - 📤 Inserting batch 1/1 (0 to 16) into ServiceCore.WorkOrderAutoGenerationServices - __SPLIT__
2026-10-06 09:13:53,745 - 13118 - src.utils.log - INFO - ✅ All 16 rows inserted successfully into ServiceCore.WorkOrderAutoGenerationServices in 1 batches - __SPLIT__
2026-10-06 09:13:53,802 - 13118 - src.utils.log - INFO - WorkOrderAutoGenerationServices inserted to dream DB - __SPLIT__
2026-10-06 09:13:53,858 - 13118 - src.utils.log - INFO - 📝 Executing: UPDATE ServiceCore.GenerateWorkOrderHistory
                        SET Status = 'Completed' WHERE GenerateWorkOrderHistoryId = 13118;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:13:54,204 - 13118 - src.utils.log - INFO - ✅ Command executed successfully - __SPLIT__
2026-10-06 09:13:54,257 - 13118 - src.utils.log - INFO - Sequential work order generation successful - __SPLIT__
2026-10-06 09:13:54,318 - 13118 - src.utils.log - INFO - Time took to perform operation: 22.94 - __SPLIT__
2026-10-06 09:46:39,127 - 13120 - src.utils.log - INFO - ParallelProcessing=False GenerateWorkOrderHistoryId=13120 - __SPLIT__
2026-10-06 09:46:39,236 - 13120 - src.utils.log - INFO - Sequential Work order generation algo started for GenerateWorkOrderHistoryId: 13120 - __SPLIT__
2026-10-06 09:46:39,288 - 13120 - src.utils.log - INFO - ✅ Successfully connected to database - __SPLIT__
2026-10-06 09:46:39,343 - 13120 - src.utils.log - INFO - 🔍 Fetching data: SELECT ConnectionStringName FROM Common.CompanyTenantMaster WHERE 
        CompanyKey  = 'Fortive'... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:46:41,376 - 13120 - src.utils.log - INFO - ✅ Fetched 0 rows - __SPLIT__
2026-10-06 09:46:41,434 - 13120 - src.utils.log - INFO - Connection string not found connecting to common DB - __SPLIT__
2026-10-06 09:46:41,483 - 13120 - src.utils.log - INFO - 📝 Executing: UPDATE ServiceCore.GenerateWorkOrderHistory
                        SET Status = 'InProgress' WHERE GenerateWorkOrderHistoryId = 13120;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:46:41,822 - 13120 - src.utils.log - INFO - ✅ Command executed successfully - __SPLIT__
2026-10-06 09:46:41,878 - 13120 - src.utils.log - INFO - 🔍 Fetching data:  
    SELECT sss.RecurringServicePrice, gw.StartDate, gw.EndDate, gw.CreatedBy AS NewCreatedBy, gw.RouteIds, 
    ss.SetupEndDate as SetupEndDateSplit ,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 = 
    13120), ',' )) OR ss.InitialRouteId IN ( SELECT CAST(value AS INT) FROM STRING_SPLIT((SELECT RouteIds 
    FROM ServiceCore.GenerateWorkOrderHistory WHERE GenerateWorkOrderHistoryid = 13120), ','))) JOIN (SELECT 
    SUM(Price) AS RecurringServicePrice, ServiceSetupId FROM ServiceCore.ServiceSetupServices GROUP BY ServiceSetupId
    ) sss ON sss.ServiceSetupId = ss.ServiceSetupId WHERE gw.GenerateWorkOrderHistoryid = 13120 AND 
    ss.FrequencyScheduleId IS NOT NULL AND ss.IsActive = 1 AND ss.IsDeleted = 0 AND ss.Status <> 'Canceled' 
    AND ((ss.OrderType = gw.OrderType) OR gw.OrderType IS NULL) AND (
    EXISTS (
        SELECT 1 FROM STRING_SPLIT(gw.BranchMasterIds, ',') s
        WHERE TRIM(s.value) = CAST(ss.branchId AS VARCHAR(20))
    )
    OR gw.BranchMasterIds IS NULL);... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:46:42,272 - 13120 - src.utils.log - INFO - ✅ Fetched 1 rows - __SPLIT__
2026-10-06 09:46:42,327 - 13120 - src.utils.log - INFO - 🔍 Fetching data: SELECT PublishStatus FROM ServiceCore.GenerateWorkOrderHistory gwoh
         WHERE CreatedDate >= '2026-10-04 09:46:42' and CompanyId  = 135... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:46:42,669 - 13120 - src.utils.log - INFO - ✅ Fetched 21 rows - __SPLIT__
2026-10-06 09:46:42,724 - 13120 - src.utils.log - INFO - 🔍 Fetching data: SELECT * from ServiceCore.GenerateWorkOrderHistory gwoh WHERE GenerateWorkOrderHistoryId = 13120;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:46:43,062 - 13120 - src.utils.log - INFO - ✅ Fetched 1 rows - __SPLIT__
2026-10-06 09:46:43,118 - 13120 - src.utils.log - INFO - FrequencyScheduleId missing for setups: []: Ignored these setups - __SPLIT__
2026-10-06 09:46:43,175 - 13120 - 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 = 13014... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:46:43,524 - 13120 - src.utils.log - INFO - ✅ Fetched 4 rows - __SPLIT__
2026-10-06 09:46:43,584 - 13120 - src.utils.log - INFO - Found the Setups and Frequencies - __SPLIT__
2026-10-06 09:46:43,639 - 13120 - src.utils.log - INFO - Rule is violating: setup 23442 has < 12 frequency -- Work Order not generated for this setup - __SPLIT__
2026-10-06 09:46:43,692 - 13120 - src.utils.log - INFO - No setups found for GenerateWorkOrderHistoryid: 13120 - __SPLIT__
2026-10-06 09:46:43,751 - 13120 - src.utils.log - INFO - 📝 Executing: UPDATE ServiceCore.GenerateWorkOrderHistory SET
                        Status = 'Failed', WoGenErrorInfo = 'No setups found in given range',
                        WorkOrderStatusDateTime = '2026-10-06 05:46:43.751' WHERE  
                        GenerateWorkOrderHistoryId = 13120;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-06 09:46:44,088 - 13120 - src.utils.log - INFO - ✅ Command executed successfully - __SPLIT__
2026-10-06 09:46:44,143 - 13120 - src.utils.log - INFO - No Setup Found Error:No setups found for GenerateWorkOrderHistoryid: 13120 - __SPLIT__