initial commit
This commit is contained in:
commit
b70cbfbad8
10 changed files with 1741 additions and 0 deletions
27
service
Normal file
27
service
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import traceback
|
||||
|
||||
from hosted import api, node
|
||||
|
||||
|
||||
def fetch_info():
|
||||
info = api.device_info.get()
|
||||
print >> sys.stderr, info
|
||||
node["/device_info"](
|
||||
dict(
|
||||
description=info["description"],
|
||||
location=info["location"],
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
while 1:
|
||||
try:
|
||||
fetch_info()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
time.sleep(15)
|
Loading…
Add table
Add a link
Reference in a new issue