Ghost/ghost/members-events-service
Thibaut Patel d2d7fb3fe7 Moved from a floating 24h window to a UTC-aligned window
refs https://github.com/TryGhost/Ghost/pull/14197

- Moved from updating the last_seen_at value "at most every 24h" to "at most every UTC day".
- It will simplify explaining the following behavior: a publication is set in UTC-10, a user visits at 2pm on Monday and at 1pm on Tuesday, the last_seen_at value is still Monday.
- There is no way to go around the above issue due to the technical constraint of updating the `last_seen_at` value at most once a day.
- This might create database write spikes at midnight UTC
2022-02-28 14:42:17 +01:00
..
lib Moved from a floating 24h window to a UTC-aligned window 2022-02-28 14:42:17 +01:00
test Moved from a floating 24h window to a UTC-aligned window 2022-02-28 14:42:17 +01:00
.eslintrc.js
index.js
LICENSE
package.json
README.md

Members events service

Contains member services that listen on specific events to perform actions:

  • Last-seen-at updater: Updates members.last_seen_at on a page/post view event

Install

npm install @tryghost/members-events-service --save

or

yarn add @tryghost/members-events-service

Usage

Develop

This is a mono repository, managed with lerna.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Run

  • yarn dev

Test

  • yarn lint run just eslint
  • yarn test run lint and tests

Copyright & License

Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license.