| Rev |
Age |
Author |
Path |
Log message |
Diff |
| 37749 |
15 d 16 h |
vikas |
/trunk/ |
Upload directory and Data correction for lead |
|
| 37734 |
17 d 21 h |
amit |
/trunk/profitmandi-fofo/src/ |
Remove dead third-party integrations: fofo
- SpiceMoney: controller, spiceform.vm, logo, the Quick Links popover on
analysisDashboard / dashboard-readonly (its button was already commented
out in dashboard1.vm) and the /spicemoney/callback auth exclusions
- FundFina controller and the /fundfina/** auth exclusions
- Wiseapp: the Quick Links popover on 12dashboard34 (its only entry) and logos
- SmartPing injection in WebHookController; the Knowlarity webhooks keep
working with the models now in kommuno/model
- Unused Toffee model reference in WarehouseController
- tofee.* keys, aramex.tracking.url and the PAYU PAY payment option in
main and test resources |
|
| 37726 |
19 d 18 h |
amit |
/trunk/ |
sentry: stop developer laptops reporting to the live GlitchTip board
GlitchTip #586 was 57 events tagged environment=production whose stack read
/opt/homebrew/Cellar/tomcat@8/8.5.100/libexec/... with server_name set to a
developer's machine. Nothing was wrong on prod: a laptop was posting into the
production project and was indistinguishable from it.
Two things combined to allow that. The DSN lives in log4j2.xml, which ships inside
every build, so any machine running this code can report. And the Sentry SDK
defaults `environment` to "production" when it is not set -- which it never was --
so local runs arrived pre-labelled as prod.
Adds sentry.properties to each module, read off the classpath by the SDK itself
(io.sentry.config.PropertiesProviderFactory) and merged over the appender's config.
Both keys used here are honoured by io.sentry.ExternalOptions in 7.22.6 (verified
against the jar): `enabled` and `environment`.
The COMMITTED values are the safe ones -- enabled=false, environment=dev -- so a
plain local build is silent. build.gradle rewrites both from -Penv= alongside the
env.property it already writes, so only a deliberate -Penv=staging|prod build
reports, and it carries the right environment tag. tasks.build.doLast restores the
safe default afterwards, mirroring the existing handling of env.property.
Verified both directions: default build leaves enabled=false/environment=dev,
-Penv=prod yields enabled=true/environment=prod.
Note this makes the board trustworthy rather than merely quieter: events can now be
filtered on environment, and anything unlabelled is a build that predates this. |
|
| 37685 |
21 d 16 h |
amit |
/trunk/profitmandi-fofo/ |
Remove selenium from the fofo portal entirely
No browser starts in this WAR any more, and the selenium-java and
webdrivermanager dependencies are gone with it. Verified: no source reference to
selenium/WebDriver/ChromeDriver anywhere in the module, and zero selenium
artifacts on the runtime classpath.
Three pieces:
1. The insights schedule and its pull move to profitmandi-cron (r37684) and dao
(r37683). This service keeps only the READ paths -- redis, then in-memory,
then cs.agent_daily_insight -- plus refreshInsights(), which now asks the dao
sync service to run once and re-reads what it wrote. The portal therefore
holds no credentials at all: KNOWLARITY_USERNAME/PASSWORD are deleted from
this source, along with INSIGHTS_PAGE_URL and the 200-character CSS selector
the scrape depended on.
2. KnowlarityScraperService deleted. It was dead, not merely idle: zero
references anywhere, both @Scheduled annotations commented out, and its
@PostConstruct selenium block commented out with the note 'DISABLED - Live
status now comes from WebSocket via profitmandi-cron'. SVN backs that up --
r36057/r36058 (25-Mar) moved agent status to the websocket and r36072/r36075
(26-Mar) created KnowlarityBreakLogService in dao, but nobody removed the
corpse. It kept selenium in this WAR for six months after nothing used it.
The data agrees: 'On Break - <reason>' rows in cs.rbm_break_log stop on
25-27 March and plain 'Break' takes over, which is exactly that handover.
⚠ Consequence worth knowing: break-REASON granularity (lunch/meeting/sick)
was lost at that migration and is not coming back from the websocket feed.
3. setTokens() and POST /indent/set_knowlarity_tokens removed -- the method had
already been reduced to a log line, and the pull now authenticates itself per
run. Also retired the orphan knowlarity.scraper.enabled property (nothing read
it; it was still 'true' in prod), and corrected a stale section header and a
doc comment that promised 'current tokens' which no longer exist.
Not touched, deliberately: POST update_agent_status / bulk_update_agent_status /
update_status_by_name still exist and still write cs.rbm_break_log through
AgentLiveStatusService. They are orphaned -- the deleted scraper was their only
feeder and no view or script in the deployed WAR calls them -- but they are
public HTTP surface, so proving there is no INTERNAL caller is not the same as
proving no external one. Left for a separate decision. |
|
| 37651 |
22 d 19 h |
vikas |
/trunk/ |
LMS click to call |
|
| 37492 |
37 d 21 h |
amit |
/trunk/ |
errors: wire the GlitchTip appender into cron and fofo logging
Completes r37491, which committed only web's log4j2.xml. cron's and fofo's were
held back because they carried local development log paths -- a user.home
expansion in cron and an absolute /Users path in fofo. Neither can ship: /Users
does not exist on the server, so fofo logging would fail to open its file and
the Alloy stream tailing /var/log/tomcat7/fofo/fofo.log would go dead.
Both files are restored to their production paths and carry the Sentry appender.
Whoever needs the local override should re-apply it locally rather than
committing it. |
|
| 37409 |
43 d 21 h |
vikas |
/trunk/ |
Changed WhatsApp service to botpenguin (DigiWaha) |
|
| 37396 |
44 d 13 h |
amit |
/trunk/profitmandi-fofo/src/main/resources/ |
observability: delete the log4j1 config left alongside log4j2.xml in fofo
The module logs through log4j2 (log4j2.xml). This log4j.properties is a
log4j1-era leftover that nothing reads. |
|
| 37366 |
50 d 13 h |
amit |
/trunk/profitmandi-fofo/src/main/resources/META-INF/ |
Staging config: fill in the keys fofo needs to start on staging
staging.properties is much thinner than dev/prod and there is no fallback between
profiles - a missing key stops the context from starting. Adds react.app.url (no
dedicated staging build of the react partner app exists, so it points at the prod
host), app.token.url (profitmandi-web is co-deployed on the same Tomcat there) and
media.document.url. |
|
| 37337 |
51 d 20 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. |
|
| 37332 |
51 d 23 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
Move the offer-circular upload directory off a developer home path
Every upload in production failed with a 400 on mkdirs. offer.circular.dir was
never set in any environment, so it fell back to the code default
/users/amit/uploads/offer-circulars; Tomcat runs as the tomcat user, which cannot
create /users at the filesystem root, and the controller threw "Circular storage
directory is not writable".
- default is now /var/lib/smartdukaan/offer-circulars, a real server path
- offer.circular.dir set explicitly in prod.properties, and pointed at the
developer's own space in dev.properties, since /var/lib needs sudo on a
workstation
- staging.properties deliberately untouched; the new default covers it
The location has two hard constraints, now recorded on the field itself:
- OUTSIDE webapps/. A redeploy wipes anything under it, and
offer_document.stored_path is how both re-ingest and re-download resolve the
PDF, so a wipe breaks them permanently. Stray PDFs are already sitting in
WEB-INF/classes/META-INF on the server from exactly this mistake.
- OUTSIDE any web root. A circular carries the OEM's confidential cashback
economics and must never be servable as a static file. Hence /var/lib rather
than /var/www, whose local precedent /var/www/partner_stats is chmod 777.
Only fofo needs the key: the cron ingest resolves the PDF from
offer_document.stored_path and reads it as root, so 0750 tomcat:tomcat is enough.
Deploying this alone does not fix production - the directory must also exist and
be writable by tomcat. |
|
| 37251 |
63 d 19 h |
amit |
/trunk/profitmandi-fofo/src/main/resources/META-INF/ |
config: point prod new.solr.url at static0 private IP (192.168.138.45)
Matches profitmandi-web; avoids public routing to 172.105.58.16 from prod
(3ms vs WAN round-trip per solr query). Verified reachable from the prod
fofo server. |
|
| 37035 |
93 d 16 h |
aman |
/trunk/profitmandi-fofo/src/main/ |
AI lead intake in fofo app (deployable via fofo_deploy): add POST /add/lead to fofo LeadController mirroring the profitmandi-web contract (Auth-Token->401, dedup by mobile, NOT-NULL coalesced, stores state+recordingUrl, status=pending, SUCCESS envelope); exclude /add/lead from auth/role/post interceptors in WebConfig; add ai.lead.intake.token to dev/staging/prod (same values as profitmandi-web). Bot repoints host apis.smartdukaan.com -> partners.smartdukaan.com, same path/token/payload. |
|
| 36989 |
99 d 14 h |
vikas |
/trunk/profitmandi-fofo/src/main/ |
Changed mail sender password and Duplicate Req interceptor behavior |
|
| 36962 |
100 d 18 h |
vikas |
/trunk/ |
L4 and Above can now assign beat on same day |
|
| 36781 |
126 d 20 h |
ranu |
/trunk/profitmandi-fofo/src/main/ |
some Enhancements or changes |
|
| 36408 |
164 d 14 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
Sale-return reversal: controller wiring + UI for cancellability gate + INV reject + date filter
PurchaseReturnController:
/return/invoice/process — autoApprove now isIrnCancellable && !isShipped.
!isShipped guard restored: shipped goods route through manual approval
even within 24h, so the physical return goes through CN flow.
/return/invoice/reject/{proId} — new endpoint for finance to reject a
pending INV PRO (sale stands, no inventory/wallet/GST action).
/return/invoice — date filter (fromDate/toDate query params, default
last 30 days) backed by selectByWarehouseIdsAndDateRange. Limit
bumped to 200 to accommodate longer ranges.
receive-debit-note view — passes $requiresFinanceApproval so the
template can render the finance-approval banner when DN's IRN is
past the 24h window.
invoice-return.vm:
Added From/To date inputs + Apply button.
Added Reject button next to Approve & Refund for pending INV PROs.
receive-debit-note.vm:
Added one informational banner (#if $requiresFinanceApproval) above
the receipt form. No layout / JS / submit-URL change.
return.js:
#invoice-return-date-apply handler — POSTs the selected range to
/return/invoice and refreshes the table.
.reject-invoice-return handler — prompts for reason, calls the new
reject endpoint.
dev/staging/prod.properties: feature flag finance.receipt.approval.email.enabled
(default false, flip per env when mail infra is ready). |
|
| 36369 |
168 d 14 h |
vikas |
/trunk/profitmandi-fofo/src/main/ |
Fix: Sale purchase invoice item quantity calculation |
|
| 36080 |
196 d 14 h |
aman |
/trunk/profitmandi-fofo/src/main/ |
Fix:Replace "FOFO/FOCO/COCO" with "Partner" — Visual Only |
|
| 35879 |
223 d 15 h |
ranu |
/trunk/profitmandi-fofo/ |
code commit for agent live status 2.0 |
|