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
37368 55 d 14 h amit /trunk/profitmandi-cron/src/main/ Cron: raise SMTP timeouts, rotate app password, add offer-circular ingest keys

- SMTP 10s -> 30s connect / 120s read-write on both senders; the 10s read timeout was
cutting off larger attachment sends. App password rotated to match the current
Google account credential.
- offer.circular.ingest.enabled / offer.circular.review.url added to dev, staging and
prod. Off by default in all three: enabling it makes the job pick up DRAFT circulars
uploaded from the FOFO portal, parse them and mail the uploader, which should only be
switched on once offer.circular.dir is a real path in that environment. There is no
fallback between profiles, so the key has to exist in each one.
 
37352 55 d 22 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Fixed max limit to 15 lac for Credit limit  
37351 55 d 23 h ranu /trunk/ code committed for sales l3 added in bi and other model  
37340 56 d 19 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Fixed max limit to 15 lac for Credit limit  
37339 56 d 20 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Fixed max limit to 15 lac for Credit limit  
37338 56 d 20 h amit /trunk/profitmandi-cron/ Remove offer-circular ingest from cron - it now runs in the portal

Counterpart to the fofo commit that moved the parse into profitmandi-fofo. Nothing is
lost: all 13 parser classes and the test moved verbatim, and CircularIngestScheduler
was replaced by an executor-driven runner in the portal.

- com.smartdukaan.cron.offercircular deleted, main and test
- tabula dependency removed; PDFBox no longer enters this artifact at all
- dumpCircularClasspath moved to fofo, where the parser and its classpath now live

This module no longer knows anything about offer circulars, so a cron rebuild is no
longer a prerequisite for the feature to work - which was the entire problem.
 
37334 56 d 22 h amit /trunk/profitmandi-cron/ Sweep stalled offer circulars before each ingest run, and drop stale scaffolding

- The scheduler now calls reclaimStalledProcessing before looking for new work, so
a circular stranded in PROCESSING by a dead or redeployed worker is failed with a
reason instead of staying invisible forever. Threshold is 30 minutes against a
parse that takes seconds, so it can only ever catch a genuinely dead worker. The
sweep is wrapped so it can never stop the actual ingest.
- dumpCircularClasspath was labelled a temporary helper for diffing against the
reference Python. That Python has been deleted, but the task is what lets an
ingest be reproduced and measured locally per scripts/offer_circular/README.md,
so the comment now says what it is for rather than telling the next reader to
delete it.
- CircularExtractor's javadoc claimed verification against the Python reference.
That proved equivalence, not correctness - both shared the missing-memory-unit
bug that bound offers to the wrong SKU. Reworded so it cannot be read as a
correctness guarantee, and points at the fixture and ProductNamesTest instead.

Verified: full ingest of the Aug'26 circular is byte-identical to the reference -
239 offers, 663 products, 279 AUTO_EXACT. ProductNamesTest 11/11.
 
37330 57 d 13 h amit /trunk/profitmandi-cron/ Add Pine Labs affordability circular parsing and ingest

Turns the monthly OEM "Mobile & Laptop Offers" PDF into the offers schema: tabula
extraction to nine verbatim columns per row, per-cell parsers for benefit, tenure,
bank and footnote text, catalog matching, and a scheduler that claims DRAFT
documents uploaded from the FOFO portal and emails the uploader the outcome.

Ships inert. offer.circular.ingest.enabled defaults to false, so the scheduler does
nothing until an environment opts in, and offer.circular.review.url defaults to
empty - neither key is required for the context to start.

- tabula added here and not in profitmandi-common so PDFBox never reaches the
web/fofo WARs; bouncycastle, slf4j-simple and jai-imageio excluded (version
clash, duplicate SLF4J binding, and unused image decoding respectively)
- offer_raw_row holds all nine columns verbatim, so re-parsing reads the table and
never the PDF again
- product_alias is consulted before matching, so a human confirmation recorded once
keeps applying every following month

ProductNamesTest locks in the product-name parsing, which decides which SKU an
offer's money lands on. Every case there is a real mis-parse, and they share one
root cause: characters or digits belonging to the model name being eaten as memory
or stripped as punctuation. Two worth naming:

- A memory spec with no GB/TB unit is still a memory spec. Motorola writes
"(8+256)" and vivo "(8+256G)"; unrecognised, the matcher believed no size was
given and bound the offer to an arbitrary sibling - a 1,000 Edge 60 Pro 8+256
offer and a 2,000 12+256 offer landed on the same SKU.
- Two variant groups written back-to-back are two products. "Edge 70 Pro
(8+256)(12+256)" stayed one product bound to a single SKU while the 12+256
variant silently got no offer at all.

Bundled accessories are deliberately NOT stripped back to the bare phone. Doing so
resolves 30 CATALOG_GAP rows and looks safe on Oppo, whose bundled and bare rows
carry identical values - but vivo caps X300 Pro(16+512G) at 10,000 on its own row
and 11,000 on the "+Extender" row, the difference being the Extender. Merging them
would let the bundle's cap be claimed on a phone sold without the accessory.
Whether a bundle offer transfers to the bare SKU is a commercial question the PDF
does not answer, so it is a manual coverage decision, not a parsing rule.

Verified against the Aug'26 circular on the local DB: 324 rows in the PDF, 239
loaded, producing 361 benefits, 511 tenures, 911 bank links and 663 products, of
which 74% resolve automatically. ProductNamesTest 11/11.
 
37326 57 d 17 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Add --backfillMissingEwb cron arg

Runs InvoiceService.backfillMissingEwb over an explicit invoice list:
--backfillMissingEwb --invoiceNumbers=A,B,C [--dryRun]

Explicit list rather than a date window so the backfill only touches the invoices known
to have lost their EWB. NOT_SUPPORTED on the RunOnceTasks wrapper suspends the
class-level transaction, keeping the NIC lookups outside one.
 
37314 60 d 21 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Fixed max limit to 15 lac for Credit limit  
37292 63 d 18 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Hot deals: javadoc matches reindex-based sync

syncHotDealFlags no longer mirrors model_hot_deal into tag_listing.hot_deals;
since r37276 hot_deal_b is derived from the active window at index time, so the
daily job re-indexes models whose window opened today or closed yesterday.
Comment-only, no behaviour change.
 
37265 65 d 17 h ranu /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ cron edm for new timline event  
37258 68 d 18 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Schedule syncHotDealFlags daily 00:20 (ScheduledSkeleton) + --syncHotDealFlags CLI arg: completes r37255 - without the skeleton trigger the tag_listing.hot_deals mirror never runs, so deal windows would not start/expire in Solr  
37255 68 d 18 h amit /trunk/profitmandi-cron/ feat: syncHotDealFlags cron entry + dev mail outbox recipient

- syncHotDealFlags: daily mirror of model_hot_deal windows into
tag_listing.hot_deals via ModelHotDealService
- dev.properties: mail.outbox.dev.recipient (required by MailOutboxService
in non-prod)
- restore full svn:ignore list (accidentally replaced) + graphify-out
 
37238 69 d 22 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Add --regenMarginIrns one-time CLI (dry-run default, --live to run) for generating missing IRNs on issued margin CN/DNs  
37236 69 d 22 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Add --cancelMarginDnIrns one-time CLI (dry-run default, --live to cancel) for margin DN IRN cancellation before corrected reissue  
37234 70 d 15 h vikas /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Updated Gmail Timeout  
37233 70 d 15 h ranu /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ code commited for hierarchy wise bi report sales manager as per raj  
37232 70 d 15 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Add --corrMarginCNs one-time CLI option (dry-run by default, --live to issue) invoking issueCorrectiveMarginCNs for correcting margin DNs inflated by the abs sign bug  
37230 70 d 15 h vikas /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/scheduled/ Updated Gmail Timeout  

Show All