forked from paxapos/fiscalberry
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.py
More file actions
executable file
·42 lines (26 loc) · 854 Bytes
/
server.py
File metadata and controls
executable file
·42 lines (26 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python2
# coding=utf-8
from multiprocessing import freeze_support
import argparse
from FiscalberryApp import FiscalberryApp
def init_server():
fbserver = FiscalberryApp()
# lanzar discover a URL de servidor configurado con datos del config actual
fbserver.discover()
# iniciar tornado server
fbserver.start()
def send_discover():
fbserver = FiscalberryApp()
# lanzar discover a URL de servidor configurado con datos del config actual
fbserver.discover()
if __name__ == "__main__":
freeze_support()
parser = argparse.ArgumentParser(description='servidor websockets para impresión fiscal y ESCP')
parser.add_argument('--discover',
help='envia a la URL información de este servicio.',
action='store_true')
args = parser.parse_args()
if args.discover:
send_discover()
exit()
init_server()