Skip to content

Instantly share code, notes, and snippets.

@Strernd
Created July 11, 2019 12:43
Show Gist options
  • Save Strernd/670476fd6fce7db7330b4c617357ff16 to your computer and use it in GitHub Desktop.
Save Strernd/670476fd6fce7db7330b4c617357ff16 to your computer and use it in GitHub Desktop.
'use strict';
const swf = require('serverless-workload-function');
let cold = true;
exports.handler = (params) => {
const options = params || {};
return swf(options.type || 'hash', options).then(result => {
const x = { ...result, cold };
cold = false;
return x
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment