Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37337 53 d 13 h amit /trunk/profitmandi-fofo/ Move offer-circular ingest out of cron and into the portal

The parse now runs in profitmandi-fofo, on a background thread, triggered by the
upload that produced the document.

Why: splitting one feature across two artifacts with independent deploy cadences
cost a full day. fofo shipped, cron did not, and a valid upload sat in DRAFT with
nothing on the server able to parse it - the deployed cron jar contained none of the
ingest classes. One 9-page PDF a month never justified a batch tier, and the portal
already ships two PDF stacks, so the isolation argument for keeping PDFBox out was
weaker than it looked.

- 13 parser classes move verbatim from com.smartdukaan.cron.offercircular to
com.spice.profitmandi.web.offercircular. No logic changed.
- CircularIngestScheduler becomes CircularIngestRunner: the @Scheduled(every 5 min)
entry point and the offer.circular.ingest.enabled flag are gone, replaced by a
single-threaded daemon executor. All claim, ingest and notification logic is
unchanged.
- Upload hands the document id to the runner AFTER COMMIT, not inline. The DRAFT row
is written inside the request transaction; a worker starting immediately would race
that commit, find nothing to claim and silently do nothing - which is precisely the
stuck-on-DRAFT symptom this change removes.
- The guarded claim is KEPT even though there is now one trigger. It still stops a
double-submit, a second portal node, and a re-ingest racing an in-flight parse.
- Re-ingest parses immediately instead of queueing for a scheduler.
- The stall reaper runs when the review screen loads. There is no timer here any
more, and a document stranded by a redeploy mid-parse only matters when somebody
looks for it - which matters more now the parse lives in the web application.
- tabula moves to this module with its exclusions intact, as does the
dumpCircularClasspath helper the local ingest harness depends on.
- Screen no longer claims "the ingest job runs every 5 minutes", which was untrue the
moment cron stopped being the route; poll interval 15s -> 3s to match a parse that
takes seconds. jsVersion 404 -> 405.
- offer.circular.review.url added here, since the runner sends that email now.

Verified: full ingest of the Aug'26 circular through the relocated code is identical
to the reference - 239 offers, 663 products, 279 AUTO_EXACT, 361 benefits, 511
tenures, 911 bank links. ProductNamesTest 11/11 in its new home.
 
36878 113 d 11 h aman /trunk/profitmandi-fofo/ donotcommit  
36876 113 d 11 h aman /trunk/profitmandi-fofo/ Bump profitmandi-fofo version to 0.0.2-SNAPSHOT  
35879 225 d 7 h ranu /trunk/profitmandi-fofo/ code commit for agent live status 2.0  
35433 296 d 4 h amit /trunk/profitmandi-fofo/ Add @Transactional(readOnly=true) to read-only controllers for performance

Updated 11 controllers that only perform read operations:
- AnalysisDashboardController, InvoiceController, ItemLedgerController
- MapTrackController, MarginController, MongoMigrationController
- PartnerPendingTasksController, PostOfficeController, ScanRecordController
- LogixController, MonitorController

Benefits:
- Hibernate skips dirty checking (faster)
- Database can optimize for read-only queries
- Connection marked as read-only for potential read replica routing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
 
34687 475 d 5 h amit.gupta /trunk/profitmandi-fofo/ Added Hikari pool  
33265 899 d 9 h ranu /trunk/profitmandi-fofo/ revert build.gradle file  
33258 900 d 7 h ranu /trunk/ change path invoices invoice service  
32171 1199 d 15 h jai.hind /trunk/ Loan summary reversed  
32170 1201 d 12 h jai.hind /trunk/ Loan summary  
30471 1600 d 14 h amit.gupta /trunk/ Fixed ahead issue  
29901 1721 d 2 h amit.gupta /trunk/profitmandi-fofo/  
26216 2456 d 14 h amit.gupta /trunk/ Fixed maven repo  
25716 2546 d 11 h amit.gupta /trunk/profitmandi-fofo/  
24509 2796 d 15 h amit.gupta /trunk/ Added Wallet Statement  
24322 2857 d 7 h amit.gupta /trunk/profitmandi-fofo/  
24313 2859 d 8 h amit.gupta /trunk/profitmandi-fofo/  
23951 2998 d 11 h amit.gupta /trunk/ Added pricedrop summary model  
23871 3014 d 9 h amit.gupta /trunk/profitmandi-fofo/ Added static date time formatters to viewResolver  
23175 3196 d 13 h ashik.ali /trunk/profitmandi-fofo/ Disable the test cases  

Show All