| Line 5... |
Line 5... |
| 5 |
import com.smartdukaan.cron.scheduled.b2b.Listing;
|
5 |
import com.smartdukaan.cron.scheduled.b2b.Listing;
|
| 6 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
6 |
import com.smartdukaan.cron.scheduled.leadsync.LeadSyncRunner;
|
| 7 |
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
|
7 |
import com.smartdukaan.cron.scheduled.ordertracking.OrderTrackingService;
|
| 8 |
import com.smartdukaan.cron.scheduled.purchaseorder.POScheduler;
|
8 |
import com.smartdukaan.cron.scheduled.purchaseorder.POScheduler;
|
| 9 |
import com.smartdukaan.cron.scheduled.razorpay.FetchPartnersDisbursementTask;
|
9 |
import com.smartdukaan.cron.scheduled.razorpay.FetchPartnersDisbursementTask;
|
| - |
|
10 |
import com.smartdukaan.cron.scheduled.knowlarity.KnowlarityCallMonitorScheduler;
|
| - |
|
11 |
import com.spice.profitmandi.common.model.InvoicePdfModel;
|
| 10 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
12 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 11 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
13 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
| 12 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
14 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
| 13 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
15 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
| 14 |
import com.spice.profitmandi.dao.service.shopify.ShopifyProductSyncService;
|
16 |
import com.spice.profitmandi.dao.service.shopify.ShopifyProductSyncService;
|
| Line 224... |
Line 226... |
| 224 |
POScheduler poScheduler;
|
226 |
POScheduler poScheduler;
|
| 225 |
|
227 |
|
| 226 |
@Autowired
|
228 |
@Autowired
|
| 227 |
ShopifyProductSyncService shopifyProductSyncService;
|
229 |
ShopifyProductSyncService shopifyProductSyncService;
|
| 228 |
|
230 |
|
| - |
|
231 |
@Autowired
|
| - |
|
232 |
KnowlarityCallMonitorScheduler knowlarityCallMonitorScheduler;
|
| 229 |
|
233 |
|
| 230 |
@Override
|
234 |
@Override
|
| 231 |
public void run(ApplicationArguments args) throws Exception {
|
235 |
public void run(ApplicationArguments args) throws Exception {
|
| 232 |
//scheduledTasks.test();
|
236 |
//scheduledTasks.test();
|
| 233 |
//System.exit();
|
237 |
//System.exit();
|
| 234 |
LOGGER.info("Called run method");
|
238 |
LOGGER.info("Called run method");
|
| - |
|
239 |
|
| - |
|
240 |
// Knowlarity Call Monitor - Manual trigger (if 10 AM scheduled start was missed)
|
| - |
|
241 |
// This just starts the monitor; scheduled healthCheck and stopMonitoring will still work
|
| - |
|
242 |
if (args.containsOption("startKnowlarityMonitor")) {
|
| - |
|
243 |
LOGGER.info("Starting Knowlarity Call Monitor manually...");
|
| - |
|
244 |
knowlarityCallMonitorScheduler.startMonitoring();
|
| - |
|
245 |
LOGGER.info("Knowlarity Call Monitor started. Scheduled tasks will handle health checks and 10 PM stop.");
|
| - |
|
246 |
// No sleep needed - Spring scheduler keeps app running and handles 10 PM stop
|
| - |
|
247 |
}
|
| - |
|
248 |
if (args.containsOption("stopKnowlarityMonitor")) {
|
| - |
|
249 |
LOGGER.info("Stopping Knowlarity Call Monitor...");
|
| - |
|
250 |
knowlarityCallMonitorScheduler.stopMonitoring();
|
| - |
|
251 |
}
|
| - |
|
252 |
|
| 235 |
if (args.containsOption("removePartialBillingForTransaction")) {
|
253 |
if (args.containsOption("removePartialBillingForTransaction")) {
|
| 236 |
if (args.containsOption("trId")) {
|
254 |
if (args.containsOption("trId")) {
|
| 237 |
int transactionId = Integer.parseInt(args.getOptionValues("trId").get(0));
|
255 |
int transactionId = Integer.parseInt(args.getOptionValues("trId").get(0));
|
| 238 |
scheduledTasks.removePartialBillingForTransaction(transactionId);
|
256 |
scheduledTasks.removePartialBillingForTransaction(transactionId);
|
| 239 |
}
|
257 |
}
|
| Line 592... |
Line 610... |
| 592 |
}else if (args.containsOption("generateBiReport")) {
|
610 |
}else if (args.containsOption("generateBiReport")) {
|
| 593 |
scheduledTasksTest.generateBiReport();
|
611 |
scheduledTasksTest.generateBiReport();
|
| 594 |
}else if (args.containsOption("abmSendertest")) {
|
612 |
}else if (args.containsOption("abmSendertest")) {
|
| 595 |
runOnceTasks.setAbmReportSender();
|
613 |
runOnceTasks.setAbmReportSender();
|
| 596 |
}else if (args.containsOption("syncProductsToShopify")) {
|
614 |
}else if (args.containsOption("syncProductsToShopify")) {
|
| 597 |
shopifyProductSyncService.syncByWarehouse(ProfitMandiConstants.WAREHOUSE_NAME_MAP.get("DELHI"));
|
615 |
shopifyProductSyncService.syncByWarehouse(ProfitMandiConstants.WAREHOUSE_NAME_MAP.get("UP-WEST/NOIDA"));
|
| 598 |
}
|
616 |
}
|
| 599 |
else if (args.containsOption("fetchPartnerDisburseMentTask")) {
|
617 |
else if (args.containsOption("fetchPartnerDisburseMentTask")) {
|
| 600 |
if(args.containsOption("fetchDisbursements")){
|
618 |
if(args.containsOption("fetchDisbursements")){
|
| 601 |
fetchPartnersDisbursementTask.fetchDisbursementsTest();
|
619 |
fetchPartnersDisbursementTask.fetchDisbursementsTest();
|
| 602 |
}
|
620 |
}
|