github atom36942/atom v19.5.0
Atom 19.5.0

latest release: v19.5.1
one hour ago
  • Writes on any database: every generic write route (object create, update, delete and delete-all) checks its columns against, and writes to, the database ?connection= names once the route has "is_connection_param": True; before, the checks read master's schema. Atom flags /admin/object-create, /admin/object-update and /admin/object-delete; a project flags the others in config_extend.py. The route's flag and the database user's own rights decide where a write may go, so give replicas and reporting databases a read-only user (docs/database.md).
  • The create buffer works on any database: buffered rows keep their database and every flush (the timer, a full buffer, /admin/sync, shutdown) writes each database's rows through its own pool; before, they were always written to master. A database without a pool, or a failed insert, keeps its rows and the others are still written. config_postgres_buffer_flush_auto_sec_<name> sets one database's interval (for example 2 s for device data). The Monitor page lists each buffer with its database.
  • func_postgres_create for time-series and webhooks: connection (the database name its pool belongs to, kept by buffered rows), on_conflict="nothing" (ON CONFLICT DO NOTHING: a duplicate is skipped, never fails a batch), and RETURNING id only when the table has an id column, so a hypertable keyed on device and time can be written and buffered.
  • Queued jobs on any database: a create or update sent with queue= carries its database; consumers open that database's pool (any config_postgres_url_<name> in their environment) on its first job.
  • Callers that can't sign: route keys ip_allow (addresses or CIDR ranges) and token_verify (a shared secret in a header, or in a query value whose name contains token), checked before the body is read: 403 otherwise. For device and IoT clouds that push without a signature; webhook_verify stays the choice for senders that sign (docs/webhook.md).
  • /permission/object-read and /permission/object-read-export take ?connection=, like the other read routes.
  • Fix: /my/object-read on another database marked the messages it returned as read on master; it now marks them on the database it read.
  • TimescaleDB guide: taking points from a device webhook (buffered, per-database interval, duplicates, backfill) and what to use on the Apache edition some managed services ship (scheduled drop_chunks, rollup tables refreshed on a schedule) (docs/timescaledb.md).
  • Internal: func_postgres_buffer_flush_all(app_state, connections=None) and func_postgres_buffer_flush_periodic_task(app_state) take no pools any more (they use client_postgres_dict); func_consumer_run takes postgres_url_dict.

Don't miss a new atom release

NewReleases is sending notifications on new releases.