Skip to content

Commit 6e40860

Browse files
author
Robin W.
committed
some of the init for datasource
1 parent 0c9b40a commit 6e40860

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

oshconnect/datasource/__init__.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
def isDefined(v):
2+
return v is not None
3+
4+
def randomUUID():
5+
return str(v)
6+
7+
class Mode(enum):
8+
REPLAY = "replay"
9+
BATCH = "batch"
10+
REAL_TIME = "realTime"
11+
12+
DATASOURCE_DATA_TOPIC = 'datasource-data-'
13+
batchsize = 1
14+
15+
16+
class DataSourceWorker:
17+
def __init__(self,dataSourceHandlers):
18+
self.dataSourceHandlers = dataSourceHandlers
19+
20+
class DataSourceHandler:
21+
def __init__(self,context,topic,broadcastChannel,values,version,properties,initialized):
22+
self.context = any
23+
self.topic = any
24+
self.broadcastChannel = any
25+
self.values = []
26+
self.values = 0
27+
self.properties = batchsize
28+
self.initialized = False
29+
30+
31+
def handleIsInit(self,eventData, resp):
32+
dsId = eventData.dsId
33+
resp.data = self.dataSourceHandlers(dsId).isInitalized()
34+
self.postMessage(resp)
35+
36+
37+

oshconnect/datasource/datasource.py

Whitespace-only changes.

0 commit comments

Comments
 (0)