We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05123e8 commit 7151f8cCopy full SHA for 7151f8c
core.sh
@@ -139,17 +139,16 @@ function publish() {
139
local line
140
TOPIC="$1"
141
if [[ -z "$TOPIC" ]]; then
142
- debug "ATTEMPTED TO PUBLISH ON EMPTY TOPIC"
143
return
144
fi
145
if [[ ! -d "pubsub/${TOPIC}" ]]; then
146
- debug "NO SUBSCRIBERS ON ${TOPIC}"
147
148
149
- while IFS= read -r line; do
150
- find pubsub/"${TOPIC}" -type p \
151
- | xargs -P 4 -I {} bash -c "printf '%s\n' '$line' > {}"
152
- done
+ TEE_ARGS=$(find pubsub/"${TOPIC}" -type p)
+ if [[ -z "$TEE_ARGS" ]]; then
+ return
+ fi
+ tee $TEE_ARGS > /dev/null
153
}
154
155
event() {
0 commit comments