Skip to content
Snippets Groups Projects
Commit 502a0077 authored by vscherbo's avatar vscherbo
Browse files

no more delay after sending msg

parent 2657901c
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ CREATE OR REPLACE FUNCTION arc_energo.sock_send(arg_host character varying, arg_ ...@@ -4,7 +4,7 @@ CREATE OR REPLACE FUNCTION arc_energo.sock_send(arg_host character varying, arg_
LANGUAGE plpython2u LANGUAGE plpython2u
AS $function$ AS $function$
import socket import socket
import time #import time
ret = '' ret = ''
sock = socket.socket() sock = socket.socket()
sock.settimeout(1) sock.settimeout(1)
...@@ -15,7 +15,7 @@ except Exception as exc: ...@@ -15,7 +15,7 @@ except Exception as exc:
else: else:
sock.send(arg_msg.decode('utf-8').encode('cp1251')) sock.send(arg_msg.decode('utf-8').encode('cp1251'))
time.sleep(1) #time.sleep(1)
sock.close() sock.close()
return ret return ret
$function$ $function$
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment