Single service that processes an image when added to a bucket
name: ImageProcessor
extends: Service
providers:
aws:
type: AWSProvider
inputs:| import { assocNodePath, findNodeInTree, findNodePathInTree } from 'firetree' | |
| import { createIdentifier } from 'firetree/parser/pipes' | |
| import { Identifier } from 'firetree/parser/tokens' | |
| import { List } from 'immutable' | |
| import { propEq } from 'ramda' | |
| import { measure } from '../../utils' | |
| const renameFunction = measure( | |
| (context, ast, functionId) => `renameFunction:${functionId}`, |
| const functionCurry1 = (func) => { | |
| return function f1(arg0, ...rest) { | |
| if (arguments.length === 0) { | |
| throw new Error('curried method called with no arguments') | |
| } | |
| if (anyIsPlaceholder(arg0)) { | |
| if (rest.length > 0) { | |
| throw new Error('use of a placeholder with additional arguments is not supported') | |
| } | |
| return f1 |
Single service that processes an image when added to a bucket
name: ImageProcessor
extends: Service
providers:
aws:
type: AWSProvider
inputs:| name: AuthService | |
| extends: Service | |
| props.... |
| name: SimpleService | |
| extends: Service | |
| compute: | |
| type: AwsFargateCompute # switched from AwsLambdaCompute | |
| inputs: | |
| runtime: nodejs | |
| memory: 1024 | |
| timeout: 3600 |
| name: SimpleService | |
| extends: Service | |
| compute: | |
| type: AwsLambdaCompute | |
| inputs: | |
| provider: ${inputs.providers.aws} | |
| runtime: nodejs | |
| functions: |
| import isPromise from 'is-promise'; | |
| const defaultTypes = ['PENDING', 'FULFILLED', 'REJECTED']; | |
| export default function promiseMiddleware() { | |
| return ({dispatch, getState}) => { | |
| return next => action => { | |
| if (typeof action === 'function') { | |
| return action(dispatch, getState); | |
| } |