MCPcopy Create free account
hub / github.com/SimHacker/micropolis / pollService

Method pollService

turbogears/micropolis/controllers.py:1355–1376  ·  view source on GitHub ↗
(self, ignore, pollDict)

Source from the content-addressed store, hash-verified

1353
1354
1355 def pollService(self, ignore, pollDict):
1356 #print "POLLSERVICE", "ignore", ignore, "pollDict", pollDict
1357 sessionID = str(pollDict['sessionID'])
1358 ref = pollDict['ref']
1359 messages = pollDict['messages']
1360
1361 #print "pollService SESSIONID", sessionID
1362 if not sessionID:
1363 self.expectationFailed("Invalid sessionID parameter.");
1364 session = self.getSession(sessionID)
1365
1366 #print "Calling session.handlePoll", pollDict
1367 messages = session.handlePoll(pollDict)
1368 #print "Called session.handlePoll"
1369
1370 #print "POLL MESSAGES", messages
1371
1372 return {
1373 'ref': ref,
1374 'sessionID': sessionID,
1375 'messages': messages,
1376 }
1377
1378
1379 ########################################################################

Callers

nothing calls this directly

Calls 4

expectationFailedMethod · 0.95
getSessionMethod · 0.95
strFunction · 0.50
handlePollMethod · 0.45

Tested by

no test coverage detected