Subversion Repositories SmartDukaan

Rev

Hide changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff Changes
37644 22 d 3 h amit /trunk/ Cron batch infra: count real SUCCESS rows instead of deriving them, add INCOMPLETE status for runs that died mid-loop, stale-batch reaper, admin force-finalize; markItemSuccess joins the work transaction  
/trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/BatchScheduledTasks.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/enumuration/transaction/CronBatchStatus.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CronBatchItemRepository.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CronBatchItemRepositoryImpl.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CronBatchRepository.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/repository/transaction/CronBatchRepositoryImpl.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/cron/CronBatchService.java
/trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/controller/CronBatchAdminController.java
36357 168 d 3 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Fix background-thread 'no session' error in DB guard. CronBatchRepository.selectRunningForOffer uses getCurrentSession() which needs an open tx; when OfferBatchService.processOfferWithBatch is called from the async worker thread (no outer tx), the guard query crashed with 'Could not obtain transaction-synchronized Session'. Offer 8819 submit succeeded but the background run died at the guard — before createBatch, so no cron_batch / cron_batch_item rows. Added CronBatchService.findRunningForOffer wrapping the repo call in @Transactional(readOnly=true); orchestrator calls the service method instead of repo directly. Matches the pattern used by loadOfferRequest / createBatch / calculate*Payouts — every caller opens its own tx.  
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/cron/CronBatchService.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/OfferBatchService.java
36337 168 d 9 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/ Move CronBatchService and OfferProcessingHelper from cron to dao so web/fofo can reuse the batch infra; fix empty-IMEI NPE in getInventoryItemMap that broke /offer/process for partners with no billed/scanned serials  
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/cron
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/cron/CronBatchService.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/OfferProcessingHelper.java
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/offers/OfferServiceImpl.java