Commit graph

28 commits

Author SHA1 Message Date
324936242b fix(subsUnion): resolve turf deps by absolute path, not bare specifier
All checks were successful
build-image / build (push) Successful in 12m9s
The previous side-effect-import fix didn't work: the app's own npm deps
(installed by `meteor build`) live in programs/server/npm/node_modules,
a SIBLING of programs/server/assets, not an ancestor of it. Node's
require() only walks up parent directories looking for node_modules,
so require('@turf/circle') from the worker asset script could never
find it regardless of what gets imported elsewhere in the app — it
kept failing with "Cannot find module '@turf/circle'" even after that
fix was deployed.

calcUnionAsync.js (Meteor-compiled code, which already knows how to
locate the app's npm deps) now resolves the three turf package paths
itself and hands them to the worker via workerData; the worker
requires them by absolute path instead of bare specifier.
2026-07-30 08:48:50 +02:00
110ad66e86 feat(subsUnion): incremental union merge for new subscriptions
All checks were successful
build-image / build (push) Successful in 13m24s
A full recreate() over 7k+ subscriptions takes ~20 minutes even in a
worker thread — fine for not blocking the site, but means a new zone
takes ages to show up on the map. Since union only grows when adding a
circle, a new subscription can just be merged into the union already
stored (one turf.union call) instead of rebuilding the whole chain.

changed/removed still trigger a full recreate() (union can't be
"subtracted" from safely), and incrementalAdd falls back to a full
recreate whenever the stored count isn't exactly one behind what's
expected, rather than risk merging into stale state. Both paths now
share one serialized queue (FIFO for adds, coalesced for recomputes)
so they never race on the same stored union.
2026-07-30 08:07:00 +02:00
fbb746fba2 fix(subsUnion): move geo-union math to a worker thread, not just yields
All checks were successful
build-image / build (push) Successful in 13m13s
The previous fix (yielding to the event loop between turf.union calls)
was not enough: once the merged polygon gets complex with thousands of
subscriptions, a single turf.union call can itself take seconds, and
yielding between iterations doesn't help when one iteration alone
blocks that long. Confirmed in staging: the site was still fully
unresponsive (Cloudflare 524, curl hanging 2+ minutes, healthcheck
failing) while a recompute ran.

Validation/decoration (addNoisy/noNoisy, cheap) stays on the main
thread; the actual circle+union chain now runs in a worker_thread
(private/workers/unionWorker.js, plain CommonJS so meteor build copies
it verbatim instead of compiling it) so the main event loop serving
DDP/HTTP is never blocked by it, regardless of how slow any single
turf call gets.
2026-07-30 07:48:17 +02:00
Vicente J. Ruiz Jurado
d4be8c7c46 Privacy updated 2018-08-04 18:42:37 +02:00
vjrj
1eb6e45dfe Added EU fire stats tweets 2018-03-22 17:42:13 +01:00
vjrj
0c56bcf7e0 Added cron tweets for active fires in 'es' and 'pt' 2018-03-17 20:06:00 +01:00
vjrj
af6676cd8c Against the Fire 2018-03-05 12:04:55 +01:00
vjrj
a8a1c43f2c Fire comments email notifications 2018-03-05 09:59:55 +01:00
vjrj
e972419b3e Added link to About 2018-03-01 11:04:35 +01:00
SergioEstan
c90ed5f1d8
Update about-en.md 2018-02-22 22:17:23 +01:00
vjrj
1e9e870df8 Minor fixes in about 2018-02-22 11:23:18 +01:00
vjrj
ae3b9e5faf About page 2018-02-22 10:49:15 +01:00
vjrj
c962d12374 Better notifications 2018-02-19 21:20:34 +01:00
vjrj
735dd55531 Fire industries marks 2018-02-08 15:54:47 +01:00
vjrj
6870de4c7b Style and text minor changes in home 2018-02-08 00:00:53 +01:00
vjrj
be10650150 New home slides 2018-02-07 18:26:09 +01:00
vjrj
edfb4e250c Urls in tos 2018-02-02 16:41:25 +01:00
vjrj
236d06308d Added more cucumber tests (wip) 2018-02-01 17:45:04 +01:00
vjrj
c67609b417 More work in email translations 2018-01-23 12:50:04 +01:00
vjrj
6c8fa91f64 Email translations 2018-01-22 13:27:46 +01:00
vjrj
952431d296 Pages (terms/tos/privacy), comments improvements, etc 2018-01-21 20:53:21 +01:00
vjrj
40aedbfdfb Added Fires page, collection and fire comments 2018-01-17 18:23:32 +01:00
vjrj
441dfa4c62 More work in home, footer, new credits page 2017-12-11 07:56:54 +01:00
vjrj
d7664cbf84 Added bootstrap package 2017-11-23 19:02:54 +01:00
vjrj
2b3c9a5868 Improved basic pages: privacy, terms, license 2017-11-15 20:01:15 +01:00
cleverbeagle
379f7dcd76 add support for transactional html/text emails
- Add support for welcome email on user creation (both OAuth and password users)
- Add support for html/text templating on verify email.
- Add support for html/text templating on reset password.
- Add handlers for converting Handlebars templates to HTML and text (template agnostic).
- Add helper function sendEmail() for compiling and sending templates via Email.send() (SMTP).
2017-09-07 17:23:08 -05:00
cleverbeagle
3bc98bc3a6 add last minute tweaks found while writing docs 2017-06-13 08:12:26 -05:00
cleverbeagle
5ba5100a52 add static pages 2017-05-30 00:28:34 -05:00