Test threading lock
This commit is contained in:
parent
48791ee1f1
commit
38d9e87393
@ -18,7 +18,6 @@ with open(r'/etc/tellme/hooks.yml') as hooksfile:
|
||||
|
||||
def sendmessage(target, message):
|
||||
print("Sendmessage %s called to %s" % (message, target))
|
||||
with lock:
|
||||
msg = ("%s %s" % (target, message))
|
||||
|
||||
# Create a unique correlation ID
|
||||
@ -53,6 +52,7 @@ def webhook_receiver(id):
|
||||
|
||||
if target is not None:
|
||||
print(target)
|
||||
with lock:
|
||||
sendmessage(target, data.get('message'))
|
||||
else:
|
||||
print("No target found, dropping message")
|
||||
|
Loading…
Reference in New Issue
Block a user