Skip to content

Remove exec abstraction #12

@phuedx

Description

@phuedx

Currently, src/server/exec.js is relied upon to abstract away whether or not to shell out the tc commands from the profiles service. When in dev mode, require('/path/to/exec').exec( '...' ) is a NOP.

If we were to separate out the caching part of the profiles service from the tc part, define an interface and its null implementation, then we can safely remove the abstraction by composing these new services:

const profilesService = require('...')
const cachingProfilesService = require('...')
const nullProfilesService = require('...')

const profileService = cachingProfilesService( IS_PROD ? profilesService : nullProfilesService )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions