Skip to content

Instantly share code, notes, and snippets.

@mxro
Created June 17, 2022 23:40
Show Gist options
  • Select an option

  • Save mxro/51d8651d0046d6df84d7dbb50ac47f61 to your computer and use it in GitHub Desktop.

Select an option

Save mxro/51d8651d0046d6df84d7dbb50ac47f61 to your computer and use it in GitHub Desktop.
// ensure table initialisation and migrations are only performed once per cold start
const coldStartKey = getColdStartKey(packageConfig, deploymentName);
if (!coldStart.has(coldStartKey)) {
await assertTable(packageConfig, deploymentName, client);
await performMigrations(packageConfig, deploymentName, migrations, client);
coldStart.set(coldStartKey, true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment