mirror of https://github.com/CIRCL/AIL-framework
Merge pull request #129 from mokaddem/master
Avoid loosing the first message in import_dir.pypull/132/head
commit
ad853b8bd8
|
@ -18,10 +18,11 @@ if __name__ == "__main__":
|
|||
context = zmq.Context()
|
||||
socket = context.socket(zmq.PUB)
|
||||
socket.bind("tcp://*:{}".format(args.port))
|
||||
time.sleep(1) #Important, avoid loosing the 1 message
|
||||
|
||||
for dirname, dirnames, filenames in os.walk(args.directory):
|
||||
for filename in filenames:
|
||||
messagedata = open(os.path.join(dirname, filename)).read()
|
||||
print(os.path.join(dirname, filename))
|
||||
socket.send('{} {} {}'.format(args.channel, filename, base64.b64encode(messagedata)))
|
||||
time.sleep(.1)
|
||||
time.sleep(.2)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
|
||||
<li id='page-myNewModule'><a href="{{ url_for('myNewModule.myNewModule_page') }}"><i class="glyphicon glyphicon-new-window"></i> myNewModule page</a></li>
|
||||
<li id='page-myNewModule'><a href="{{ url_for('myNewModule.myNewModule_page') }}"><i class="glyphicon glyphicon-new-window"></i> myNewModule </a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue