161c0d7330
refs https://github.com/TryGhost/Team/issues/1306 - Contains all services that listen on member events - Only contains the last-seen-at-updater service for now - Listens for `MemberViewEvent` events to update the `member.last_seen_at` timestamp - Updates after 24hours of the last timestamp to avoid too many writes - Also updates when the value is NULL - This is using the existing `last_seen_at` value to avoid an SQL query when no writes are required |
||
---|---|---|
.. | ||
lib | ||
test | ||
.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.
git clone
this repo &cd
into it as usual- Run
yarn
to install top-level dependencies.
Run
yarn dev
Test
yarn lint
run just eslintyarn test
run lint and tests
Copyright & License
Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license.