app.log.2026-09-21

Latest changes applied: id fetch fix (2026-10-10)
2026-10-01 06:31:00,468 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:00,506 - 13089 - src.utils.log - INFO - Connection string not found connecting to common DB - __SPLIT__
2026-10-01 06:31:00,545 - 13089 - src.utils.log - INFO - πŸ“ Executing: UPDATE ServiceCore.GenerateWorkOrderHistory
                        SET Status = 'InProgress' WHERE GenerateWorkOrderHistoryId = 13089;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:00,870 - 13089 - src.utils.log - INFO - βœ… Command executed successfully - __SPLIT__
2026-10-01 06:31:00,911 - 13089 - 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 = 
    13089), ',' )) OR ss.InitialRouteId IN ( SELECT CAST(value AS INT) FROM STRING_SPLIT((SELECT RouteIds 
    FROM ServiceCore.GenerateWorkOrderHistory WHERE GenerateWorkOrderHistoryid = 13089), ','))) JOIN (SELECT 
    SUM(Price) AS RecurringServicePrice, ServiceSetupId FROM ServiceCore.ServiceSetupServices GROUP BY ServiceSetupId
    ) sss ON sss.ServiceSetupId = ss.ServiceSetupId WHERE gw.GenerateWorkOrderHistoryid = 13089 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-01 06:31:01,276 - 13089 - src.utils.log - INFO - βœ… Fetched 1 rows - __SPLIT__
2026-10-01 06:31:01,316 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT PublishStatus FROM ServiceCore.GenerateWorkOrderHistory gwoh
         WHERE CreatedDate >= '2026-09-29 06:31:01' and CompanyId  = 135... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:01,643 - 13089 - src.utils.log - INFO - βœ… Fetched 17 rows - __SPLIT__
2026-10-01 06:31:01,690 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.GenerateWorkOrderHistory gwoh WHERE GenerateWorkOrderHistoryId = 13089;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:02,013 - 13089 - src.utils.log - INFO - βœ… Fetched 1 rows - __SPLIT__
2026-10-01 06:31:02,056 - 13089 - src.utils.log - INFO - FrequencyScheduleId missing for setups: []: Ignored these setups - __SPLIT__
2026-10-01 06:31:02,096 - 13089 - 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 = 13107... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:02,423 - 13089 - src.utils.log - INFO - βœ… Fetched 60 rows - __SPLIT__
2026-10-01 06:31:02,463 - 13089 - src.utils.log - INFO - Found the Setups and Frequencies - __SPLIT__
2026-10-01 06:31:02,511 - 13089 - src.utils.log - INFO - Inside work order function - __SPLIT__
2026-10-01 06:31:02,552 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.ServiceSetupSubWorkOrder ssswo WHERE 
     ssswo.ServiceSetupId  = 34740;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:02,871 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:02,916 - 13089 - src.utils.log - INFO - πŸ” Fetching data: select ServiceDate, ServiceSetupId, IsInitial from serviceCore.WorkOrder wo inner join 
        ServiceCore.WorkOrderStatus wos on wo.WoStatusId = wos.WoStatusId where  ServiceDate >= '2026-10-01 00:00:00' and 
        ServiceDate <= '2026-11-30 00:00:00' and ServiceSetupId = 34740 and wo.IsActive = 1 and wos.Name 
        not in ('Void', 'Cancelled');... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:03,243 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:03,874 - 13089 - src.utils.log - INFO - Generating work orders for setup: 34740 - __SPLIT__
2026-10-01 06:31:04,163 - 13089 - src.utils.log - INFO - Updating Next Gen Date - __SPLIT__
2026-10-01 06:31:04,212 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT WoStatusId From ServiceCore.WorkOrderStatus wos where CompanyId=135 and 
    [SysName]= 'Incomplete' ;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:04,533 - 13089 - src.utils.log - INFO - βœ… Fetched 1 rows - __SPLIT__
2026-10-01 06:31:04,573 - 13089 - src.utils.log - INFO - Deleting duplicate records - __SPLIT__
2026-10-01 06:31:04,615 - 13089 - src.utils.log - INFO - Running deletes SEQUENTIALLY… - __SPLIT__
2026-10-01 06:31:04,654 - 13089 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationServices 
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34740
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:04,997 - 13089 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-10-01 06:31:05,035 - 13089 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationCrews 
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34740
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:05,381 - 13089 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-10-01 06:31:05,421 - 13089 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationSalesPersonCommission 
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34740
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:05,808 - 13089 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-10-01 06:31:05,849 - 13089 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationAppliedDiscount
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34740
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:06,186 - 13089 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-10-01 06:31:06,230 - 13089 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.SetupAutoGenerationSourceMapping
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34740
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:06,569 - 13089 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-10-01 06:31:06,611 - 13089 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.SubWorkOrderAutoGeneration
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34740
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:06,951 - 13089 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-10-01 06:31:06,995 - 13089 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGenerationCommissionAdjustment
        WHERE WorkOrderAutoGenerationId IN (
            SELECT WorkOrderAutoGenerationId 
            FROM ServiceCore.WorkOrderAutoGeneration 
            WHERE ServiceSetupId = 34740
        )
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:07,320 - 13089 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-10-01 06:31:07,369 - 13089 - src.utils.log - INFO - πŸ—‘οΈ Deleting records: 
        DELETE FROM ServiceCore.WorkOrderAutoGeneration 
        WHERE ServiceSetupId = 34740
           (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:07,736 - 13089 - src.utils.log - INFO - βœ… Records deleted successfully - __SPLIT__
2026-10-01 06:31:07,778 - 13089 - src.utils.log - INFO - Checking if all rows exist in parent table or not - __SPLIT__
2026-10-01 06:31:07,818 - 13089 - src.utils.log - INFO - πŸ“₯ Inserting into ServiceCore.WorkOrderAutoGeneration: 32 rows in batches of 25000 (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:08,179 - 13089 - src.utils.log - INFO - πŸ“€ Inserting batch 1/1 (0 to 32) into ServiceCore.WorkOrderAutoGeneration - __SPLIT__
2026-10-01 06:31:10,336 - 13089 - src.utils.log - INFO - βœ… All 32 rows inserted successfully into ServiceCore.WorkOrderAutoGeneration in 1 batches - __SPLIT__
2026-10-01 06:31:10,373 - 13089 - src.utils.log - INFO - πŸ” Fetching data: Select TOP 32 WorkOrderAutoGenerationId, ServiceSetupId , ModifiedBy,
    ModifiedDate, IsInitial From ServiceCore.WorkOrderAutoGeneration WHERE ModifiedDate='2026-09-26 12:09:46.894'
    and ServiceSetupId = 34740... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:10,716 - 13089 - src.utils.log - INFO - βœ… Fetched 32 rows - __SPLIT__
2026-10-01 06:31:10,758 - 13089 - src.utils.log - INFO - Id's of work order inserted to DB: [2789643 2789644 2789645 2789646 2789647 2789648 2789649 2789650 2789651
 2789652 2789653 2789654 2789655 2789656 2789657 2789658 2789659 2789660
 2789661 2789662 2789663 2789664 2789665 2789666 2789667 2789668 2789669
 2789670 2789671 2789672 2789673 2789674] - __SPLIT__
2026-10-01 06:31:10,795 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.ServiceSetupSubWorkOrder ssswo WHERE 
     ssswo.ServiceSetupId  = 34740;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:11,121 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:11,164 - 13089 - src.utils.log - INFO - Inside get_remaining_temp_tables - __SPLIT__
2026-10-01 06:31:11,210 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from servicecore.serviceSetupServices sss where ServiceSetupId
                = 34740... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:11,533 - 13089 - src.utils.log - INFO - βœ… Fetched 1 rows - __SPLIT__
2026-10-01 06:31:11,575 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from servicecore.ServiceSetupInitialServices sss where ServiceSetupId
                = 34740... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:11,899 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:11,943 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.ServiceSetupCrew ssc where ServiceSetupId
      = 34740... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:12,264 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:12,306 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.ServiceSetupSalesPersonCommission ssspc where 
    ServiceSetupId = 34740... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:12,632 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:12,673 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.ServiceSetupCommissionAdjustment ssspc where 
    ServiceSetupId = 34740... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:12,995 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:13,040 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.serviceSetupAppliedDiscount WHERE 
     ServiceSetupId  = 34740;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:13,361 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:13,447 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * from ServiceCore.SetupSourceMapping WHERE 
     ServiceSetupId  = 34740;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:13,764 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:13,801 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * FROM [ServiceCore].[CommunicationPreferencesServiceReportNotification] WITH(NOLOCK) WHERE 
        EntityType = 'Setup' AND ServiceSetupId = 34740;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:14,140 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:14,174 - 13089 - src.utils.log - INFO - πŸ” Fetching data: SELECT * From CRM.LeadNote WHERE RefType = 'Setup' and RefId = 34740;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:14,496 - 13089 - src.utils.log - INFO - βœ… Fetched 0 rows - __SPLIT__
2026-10-01 06:31:14,538 - 13089 - src.utils.log - INFO - Inside insert_data_in_temp_tables for work order generation - __SPLIT__
2026-10-01 06:31:14,577 - 13089 - src.utils.log - INFO - πŸ“₯ Empty dataframe of CRM.LeadNote: - __SPLIT__
2026-10-01 06:31:14,616 - 13089 - src.utils.log - INFO - leadNoteDf inserted to dream DB - __SPLIT__
2026-10-01 06:31:14,656 - 13089 - src.utils.log - INFO - πŸ“₯ Empty dataframe of ServiceCore.CommunicationPreferencesServiceReportNotification: - __SPLIT__
2026-10-01 06:31:14,688 - 13089 - src.utils.log - INFO - CommunicationPreferencesServiceReportNotification inserted to dream DB - __SPLIT__
2026-10-01 06:31:14,721 - 13089 - src.utils.log - INFO - πŸ“₯ Empty dataframe of ServiceCore.SetupAutoGenerationSourceMapping: - __SPLIT__
2026-10-01 06:31:14,759 - 13089 - src.utils.log - INFO - SetupAutoGenerationSourceMapping inserted to dream DB - __SPLIT__
2026-10-01 06:31:14,797 - 13089 - src.utils.log - INFO - πŸ“₯ Empty dataframe of ServiceCore.WorkOrderAutoGenerationAppliedDiscount: - __SPLIT__
2026-10-01 06:31:14,835 - 13089 - src.utils.log - INFO - WorkOrderAutoGenerationAppliedDiscount inserted to dream DB - __SPLIT__
2026-10-01 06:31:14,868 - 13089 - src.utils.log - INFO - πŸ“₯ Empty dataframe of ServiceCore.SubWorkOrderAutoGeneration: - __SPLIT__
2026-10-01 06:31:14,903 - 13089 - src.utils.log - INFO - SubWorkOrderAutoGeneration inserted to dream DB - __SPLIT__
2026-10-01 06:31:14,937 - 13089 - src.utils.log - INFO - πŸ“₯ Empty dataframe of ServiceCore.WorkOrderAutoGenerationCommissionAdjustment: - __SPLIT__
2026-10-01 06:31:14,977 - 13089 - src.utils.log - INFO - SubWorkOrderAutoGeneration inserted to dream DB - __SPLIT__
2026-10-01 06:31:15,008 - 13089 - src.utils.log - INFO - πŸ“₯ Empty dataframe of ServiceCore.WorkOrderAutoGenerationSalesPersonCommission: - __SPLIT__
2026-10-01 06:31:15,047 - 13089 - src.utils.log - INFO - WorkOrderAutoGenerationSalesPersonCommission_df inserted to dream DB - __SPLIT__
2026-10-01 06:31:15,100 - 13089 - src.utils.log - INFO - πŸ“₯ Empty dataframe of ServiceCore.WorkOrderAutoGenerationCrews: - __SPLIT__
2026-10-01 06:31:15,130 - 13089 - src.utils.log - INFO - WorkOrderAutoGenerationCrews inserted to dream DB - __SPLIT__
2026-10-01 06:31:15,164 - 13089 - src.utils.log - INFO - πŸ“₯ Empty dataframe of ServiceCore.WorkOrderAutoGenerationServices: - __SPLIT__
2026-10-01 06:31:15,199 - 13089 - src.utils.log - INFO - WorkOrderAutoGenerationServices inserted to dream DB - __SPLIT__
2026-10-01 06:31:15,235 - 13089 - src.utils.log - INFO - Checking if all rows exist in parent table or not - __SPLIT__
2026-10-01 06:31:15,272 - 13089 - src.utils.log - INFO - πŸ” Fetching data: 
            SELECT WorkOrderAutoGenerationId
            FROM ServiceCore.WorkOrderAutoGeneration
            WHERE WorkOrderAutoGenerationId IN (2789643, 2789644, 2789645, 2789646, 2789647, 2789648, 2789649, 2789650, 2789651, 2789652, 2789653, 2789654, 2789655, 2789656, 2789657, 2789658, 2789659, 2789660, 2789661, 2789662, 2789663, 2789664, 2789665, 2789666, 2789667, 2789668, 2789669, 2789670, 2789671, 2789672, 2789673, 2789674)
        ... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:15,589 - 13089 - src.utils.log - INFO - βœ… Fetched 32 rows - __SPLIT__
2026-10-01 06:31:15,622 - 13089 - src.utils.log - INFO - πŸ“₯ Inserting into ServiceCore.WorkOrderAutoGenerationServices: 32 rows in batches of 25000 (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:15,951 - 13089 - src.utils.log - INFO - πŸ“€ Inserting batch 1/1 (0 to 32) into ServiceCore.WorkOrderAutoGenerationServices - __SPLIT__
2026-10-01 06:31:17,002 - 13089 - src.utils.log - INFO - βœ… All 32 rows inserted successfully into ServiceCore.WorkOrderAutoGenerationServices in 1 batches - __SPLIT__
2026-10-01 06:31:17,040 - 13089 - src.utils.log - INFO - WorkOrderAutoGenerationServices inserted to dream DB - __SPLIT__
2026-10-01 06:31:17,078 - 13089 - src.utils.log - INFO - πŸ“ Executing: UPDATE ServiceCore.GenerateWorkOrderHistory
                        SET Status = 'Completed' WHERE GenerateWorkOrderHistoryId = 13089;... (Thread: AnyIO worker thread) - __SPLIT__
2026-10-01 06:31:17,444 - 13089 - src.utils.log - INFO - βœ… Command executed successfully - __SPLIT__
2026-10-01 06:31:17,488 - 13089 - src.utils.log - INFO - Sequential work order generation successful - __SPLIT__
2026-10-01 06:31:17,523 - 13089 - src.utils.log - INFO - Time took to perform operation: 19.72 - __SPLIT__