Subversion Repositories SmartDukaan

Rev

Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37735 17 d 6 h amit /trunk/profitmandi-cron/src/main/ Remove dead third-party integrations: cron

- Toffee: attachToffeeInvoices (schedule already commented out), toffeeRollback
and the --tc option; tofee.* keys in run.properties
- Bharti Assist: sendBAGPendingPolicies, testBag/mapBag and the --bag /
--mapbag options
- HyperTrack geofence one-offs (--createGeofence, --getAllGeofences,
--deleteGeofences) and their hardcoded account keys
- SmartPing injection in ScheduledTasks; leftover DTDC comment
- aramex.tracking.url in run.properties
 
37726 19 d 3 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.
 
37684 21 d 1 h amit /trunk/profitmandi-cron/src/main/ Schedule the knowlarity insights pull here instead of in the fofo tomcat

Eight times a day, unchanged times (11:40, 13:40, 15:40, 17:40, 18:40, 19:15,
20:00, 20:40) so the shape of the day's data does not move. Calls
KnowlarityInsightsSyncService (dao r37683).

This lands next to KnowlarityCallMonitorScheduler on purpose: that one owns the
WebSocket status feed into cs.rbm_break_log, this one owns the periodic KPI pull
into cs.agent_daily_insight. They are the two halves of the same integration and
were previously split across two processes for no reason other than history.

What it replaces: the same schedule inside the fofo tomcat, where every run
started an ~850MB headless chrome on a box that holds a -Xmx8g tomcat and a
-Xmx2g cron jar on 16GB and has been kernel-OOM-killed twice. A run is now four
HTTPS calls, ~2-3 seconds.

⚠ Only fires under --spring.profiles.active=scheduled; a one-shot CLI run does
not start the schedulers.

staging.properties gains the knowlarity block. It had NO knowlarity keys at all,
which means the WebSocket call monitor has never run there either -- this fixes
both. Same credentials as prod; there is no separate SR tenant for staging.

Cadence is worth revisiting separately: the 8 slots were chosen when a run cost
75 seconds and 850MB. At 2 seconds, hourly or every 15 minutes during the
10:00-21:00 window (matching the call monitor) would be nearly free.
 
37492 37 d 6 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.
 
37406 43 d 7 h amit /trunk/profitmandi-cron/src/main/resources/META-INF/ Vivo captcha: put the /verdict shared secret in the cron properties

The token was only in run-cron.sh, which is not version-controlled. Rebuild the
box or deploy elsewhere and it silently vanishes -- the verdict call is
best-effort and swallows failures, so nothing would break loudly; training data
would just quietly stop being collected. Properties travel with the build.

dev and staging are deliberately empty: with no token CaptchaService skips the
call entirely, so a local run cannot post verdicts to the live solver and
pollute the training corpus.

CAPTCHA_VERDICT_TOKEN in the environment still overrides this, so the token can
be rotated without a rebuild.
 
37368 49 d 22 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.
 
37255 63 d 3 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
 
37226 65 d 0 h ranu /trunk/profitmandi-cron/src/main/resources/META-INF/ password update knowlarity  
36445 159 d 23 h ranu /trunk/ knowlarity username password update  
36058 197 d 1 h ranu /trunk/ web socket done for agent status  
35832 227 d 3 h amit /trunk/ Unify property loading: all modules use runtime profile with shared properties from dao, remove duplicated DB/Hibernate/HikariCP/integration keys from module files  
35831 227 d 3 h amit /trunk/profitmandi-cron/src/main/resources/META-INF/ Restore cron env property files - needed by copyEnv build task for env switching  
35830 227 d 4 h amit /trunk/ Remove 6 dead property files (dao + cron), remove hardcoded shared-dev from cron config  
35633 250 d 6 h amit /trunk/ Add hikari.keepaliveTime property to all environment configs  
35598 253 d 21 h amit /trunk/profitmandi-cron/src/main/resources/META-INF/ Migrate from C3P0 to HikariCP connection pooling

- Replace C3P0 properties with HikariCP settings
- New settings: maximumPoolSize=20, minimumIdle=2, idleTimeout=30s, maxLifetime=30min
 
34867 427 d 1 h ranu /trunk/profitmandi-cron/src/main/resources/META-INF/ razorpay x automate payment with rabbit mq  
34866 427 d 1 h ranu /trunk/profitmandi-cron/src/main/resources/META-INF/ razorpay x automate payment with rabbit mq  
34863 427 d 1 h ranu /trunk/profitmandi-cron/src/main/resources/META-INF/ razorpay x automate payment with rabbit mq  
34862 427 d 2 h ranu /trunk/ razorpay x automate payment with rabbit mq  
34860 427 d 23 h ranu /trunk/ razorpay x automate payment with rabbit mq  

Show All