Working version of the async pub/sub notifier for callbacks

This commit is contained in:
kexkey
2019-05-20 14:33:37 -04:00
committed by kexkey
parent ed71a2ed8f
commit ac2b031bf0
12 changed files with 124 additions and 75 deletions

View File

@@ -13,6 +13,7 @@ main() {
local response_topic
while read msg; do
trace "[main] New msg just arrived!"
trace "[main] msg=${msg}"
cmd=$(echo ${msg} | jq ".cmd" | tr -d '"')
@@ -25,14 +26,14 @@ main() {
web)
response=$(web "${msg}")
publish_response "${response}" "${response_topic}" ${?}
trace "[main] PR"
;;
esac
trace "[main] case finished"
trace "[main] msg processed"
done
}
export TRACING=1
main
trace "[requesthandler] exiting"
exit $?