taskProcessingDeserialize method Method serializes incoming task to the JSON string
143 def transportCommunications(self, cmd, requestObjects):
151 timeout = self.config.get(CONSTANTS.APP_NAME, CONSTANTS.TCP_TIMEOUT_CONFIG_NAME)
152 except ConfigParser.NoSectionError:
153 timeout = CONSTANTS.TCP_TIMEOUT
154 except ConfigParser.NoOptionError:
155 timeout = CONSTANTS.TCP_TIMEOUT
157 for requestObject
in requestObjects:
158 if cmd == CONSTANTS.TASKS[0]:
159 eventType = EVENT_TYPES.ADMIN_FETCH_STAT_DATA
161 elif cmd == CONSTANTS.TASKS[1]:
162 eventType = EVENT_TYPES.ADMIN_SET_CONFIG_VARS
164 elif cmd == CONSTANTS.TASKS[2]:
165 eventType = EVENT_TYPES.ADMIN_GET_CONFIG_VARS
167 elif cmd == CONSTANTS.TASKS[3]:
168 eventType = EVENT_TYPES.ADMIN_STATE
170 elif cmd == CONSTANTS.TASKS[4]:
171 eventType = EVENT_TYPES.ADMIN_SUSPEND
173 elif cmd == CONSTANTS.TASKS[5]:
174 eventType = EVENT_TYPES.ADMIN_SYSTEM
176 elif cmd == CONSTANTS.TASKS[6]:
177 eventType = EVENT_TYPES.ADMIN_SQL_CUSTOM
180 event = self.eventBuilder.build(eventType, requestObject)
181 self.localConnection.send(event)
182 if self.localConnection.poll(timeout) == 0:
183 responseTuple = [emptyResponse, CONSTANTS.ERROR_NETWORK]
185 retEvent = self.localConnection.recv()
186 responseTuple = [retEvent.eventObj, CONSTANTS.ERROR_NOERROR]
187 responses.append(responseTuple)
GeneralResponse event object, represents general state response for multipurpose usage.
AdminConfigVars event object, for admin set or get config variables from any of threaded classes or a...
AdminStatData event object, for admin fetch stat fields and possible data from any threaded classes i...