| 36357 |
21 d 15 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 |
21 d 21 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
|