Skip to content

Instantly share code, notes, and snippets.

@CodyKochmann
Last active February 26, 2021 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodyKochmann/f682f403709a7f7e94e81375ba444977 to your computer and use it in GitHub Desktop.
Save CodyKochmann/f682f403709a7f7e94e81375ba444977 to your computer and use it in GitHub Desktop.
# makefile for a directory based work queue
# by: Cody Kochmann
SHELL := /bin/bash
QUEUE_SERVICE_WORKDIR := ${HOME}
MKDIR := mkdir -v
# service io
# where external things dump new targets
SERVICE_INPUT := ${QUEUE}/input/
# where the service dumps its output
SERVICE_OUTPUT := ${QUEUE}/output/
# queue components
# location of all queue components
QUEUE := ${QUEUE_SERVICE_WORKDIR}/queue/
# where upcoming targets are first queued
Q_PENDING := ${QUEUE}/pending/
# where tasks currently being worked on go
Q_CURRENT := ${QUEUE}/currnet/
# where finished tasks that failed go
Q_FAILED := ${QUEUE}/failed/
# where finished tasks that succeeded go
Q_SUCCESSFUL := ${QUEUE}/successful/
setup-dirs:
${MKDIR} ${SERVICE_INPUT}
${MKDIR} ${SERVICE_OUTPUT}
${MKDIR} ${QUEUE}
${MKDIR} ${Q_PENDING}
${MKDIR} ${Q_CURRENT}
${MKDIR} ${Q_FAILED}
${MKDIR} ${Q_SUCCESSFUL}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment