This commit is contained in:
darthsandmann
2016-10-16 21:53:15 +02:00
parent 0d10f8b9dc
commit c9f3117da1
412 changed files with 137942 additions and 0 deletions

View File

@ -0,0 +1,33 @@
# coding: utf-8
import time
import codecs
import json
from app import stream
class chargen_cl(object):
exposed = True
chargenCounter = 1
def __init__(self):
self.stream = stream.stream_cl()
def NEXT(self):
if(self.chargenCounter > self.stream.anzChargen()):
self.chargenCounter = 1
# timeout = 0
# while(self.chargenCounter > self.stream.anzChargen()):
# print(self.stream.anzChargen())
# time.sleep(1)
# timeout += 1
# if(timeout > 3600):
# return -1
newCharge = self.stream.loadCharge(self.chargenCounter)
self.chargenCounter += 1
return json.dumps(newCharge)