- added variable polling rates to try to handle bursts of activity/events
- added generic worker to process jobs from filepath (saved in jobs.metadata.job)
- prevented duplicate queue entries
These call the aggregateStats query. There was a bug in the second email set, which was set to a count of 6 but has no fixture data for email recipients, so it was false. This should not be a fixed field but probably dynamic... though this part of the code base is a bit fraught as it is, and I'm reluctant to touch anything in this context.
- updated batch data to aggregate to one message with timings
- updated aggregate queries to log times so we don't need to calculate it
- removed trying to run aggregation when we don't have any events, which led to extra logging and is unnecessary
The logging in general is quite verbose and more like debug logs. I'm good with that for the moment while we're working on this, but we can still be a bit more concise.
This effectively forces the jobs to fetch the last run timestamps to set in the db, because this was previously implemented for a period and we didn't null these values when reverting that commit.
If we conservatively (somewhat) figure ~2500 events/min, and that the job is on a 5min cron, we should try to keep the loop cycle to ~5 mins or less in order to repeat the fetch logic, which now prioritizes opens.
Open data is the only data to update any stats, so we want to make sure if people are pressing refresh that we do our best to keep it up to date.
Meanwhile, if we don't find opens, we can move on to filling in the other event data, collecting missed events, and scheduled backfills, in that order.
no issue
Give your audience a simple way to support your work with one-time payments, no membership required.
- cleaned up `tipsAndDonations` labs flag
closes https://linear.app/tryghost/issue/PLG-205
The server trims whitespace from the title when saving but our unsaved changes detection was comparing the raw title input field value meaning there would be a mismatch after publishing if the title field contained leading/trailing whitespace.
- updated title comparison to compare trimmed values
- moved and improved unsaved changes modal tests from publish-flow to unsaved-changes acceptance test file
- added util for pasting content into the editor to test for content changes
no issue
- fixed eslint config so tests are correctly linted
- removed `.only` on stats tests preventing other tests from running
- removed unneccessary `return` from async setup functions
ref https://linear.app/tryghost/issue/DEV-20/faster-builds
- we can save 75KB by using a tree-shaking import for validator
- import string comes from validator docs
- also adds validator import, which was missing for this package
[ANAL-1](https://linear.app/tryghost/issue/ANAL-32/add-stats-kpis-charts)
The technical details section in Stats contains only the browser breakdown ATM. This PR adds the rest (devices, operating systems) and fixes a couple of minor UI details on the rest of the charts
ref https://linear.app/tryghost/issue/DEV-20/faster-builds
- `build` should be the overall script to build the package
- `build:ts` should only build TypeScript
- by having them switched around, `build:ts` would call `yarn build`,
and `yarn` adds several hundreds of milliseconds of time to each build
closes https://linear.app/tryghost/issue/ANAL-23/filtering-by-logged-out-logged-in-traffic
- Updated all of our tinybird datasources and pipes to handle member status
- Added member_status as an array query param to the API endpoints
- Added a really dodgy power select multiple to the stats page to demonstrate it works (needs styling)
- Added all of the wiring so each chart updates
- This was done pretty fast, and may not be 100% right yet
closes https://linear.app/tryghost/issue/PLG-190
- often when adding portal links to your own site pages the URLs are added as absolute on the site's homepage due to copy+paste from displayed URLs in Admin
- when clicking absolute portal URLs the homepage is first loaded before the Portal popup is shown resulting in a slower and flashier experience
- added a transform for all local portal URLs on the page when Portal is initialized so links open the Portal popup immediately on the current page
ref https://linear.app/tryghost/issue/DEV-20/faster-builds
- we added concurrently because, in theory, it should make builds faster
by utilizing more cores
- however, when combined with Nx, it seems that we are trying to exceed
the number of cores, which actually makes individual builds slower
- I've removed concurrently from the apps, which should improve the
build time significantly
ref https://linear.app/tryghost/issue/DEV-20/faster-builds
- this was previously causing duplicate builds of the TS projects
because Nx was building all projects with `build` targets, and we were
also calling `build:ts`
- this cuts 12 compilation jobs from the archive process, which should
help with container build times
no issue
- Running `yarn` on `main` was making changes to the `yarn.lock` file
without any code/dependency changes — committing those changes to fix
this.