Increase Fleet Sandbox time to five days (#9251)

Changes:
- Updated the expiration timestamp of new Fleet Sandbox instances to be
five days from when a user signs up. (Previously 24 hours)
This commit is contained in:
Eric 2023-01-10 17:48:36 -06:00 committed by GitHub
parent 5919931a4c
commit b5d2d0c4b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,8 +102,9 @@ the account verification message.)`,
// Provisioning a Fleet sandbox instance for the new user. Note: Because this is the only place where we provision Sandbox instances, We'll provision a Sandbox instance BEFORE
// creating the new User record. This way, if this fails, we won't save the new record to the database, and the user will see an error on the signup form asking them to try again.
const FIVE_DAYS_IN_MS = (5*24*60*60*1000);
// Creating an expiration JS timestamp for the Fleet sandbox instance. NOTE: We send this value to the cloud provisioner API as an ISO 8601 string.
let fleetSandboxExpiresAt = Date.now() + (24*60*60*1000);
let fleetSandboxExpiresAt = Date.now() + FIVE_DAYS_IN_MS;
// Creating a fleetSandboxDemoKey, this will be used for the user's password when we log them into their Sandbox instance.
let fleetSandboxDemoKey = await sails.helpers.strings.uuid();