- stopppable is a dependency that handles closing connections properly, which server.close does not
- active connections are allowed to complete what they are doing
- idle connections are closed
- no new connections are allowed
- we call stoppable in stop() instead of server.close so that idle connections don't hold the server open
- calling await stop() from shutdown then ensures that we have a consistent experience of stop
- all together this allows ghost to shutdown gracefully when there are long-running requests
- @TODO: handle graceful shutdown of long-running processes
- @TODO: consider do we need to send 503s whilst the server is shutting down?
refs 1a17f8069b
- sub-dependency update bumped moment versions to 2.27.0 which caused timezone problems again with dates not being written to the database in UTC
- added a resolution in package.json to pin all moment sub-dependencies to the same version we specify in our top-level dependencies
refs https://github.com/gruntjs/grunt/pull/1675
- Grunt 1.2.0 removed coffeescript as a dependency, opting to leave it
to the users to install
- we use `grunt-bg-shell`, which is built in coffeescript and therefore
needs the dependency else `grunt dev` doesn't work
- I don't like needing to add coffeescript but it'll do until we give
the dev experience a good cleanup
no-issue
This fixes a problem when subscribing to a Plan (Price) with a default
trial period. We also add logging to add a little more information about
which flow we're entering.
Subscriptions that are started with a trial have a
present on the Checkout Session object, which was incorrectly causing us
to determine that we are in a setup flow and attempt to update a
customers card details.
We now use the property of the Checkout Session to determine
whether we are handling a new Subscription, or if we are in a setup
flow and should update the Customer's card details.
Includes the code from https://github.com/TryGhost/Members/pull/184