ticoann/WMCore — pull request #10 by cinquo (2012-02-22 09:40:56+00:00)
Title: Dev/monitoring

This is fixing an issue with DataCollectAPI about data type.
Error from log here (*).
Debug line added by me printing the dictionary that cannot be converted by cjson.encode can be found here: http://pastebin.com/mFEMwqrS
There you can see the long numbers for the pending jobs and some site which is at None (I guess they are at None because we are using the WMS mode on).

(*)
Backtrace:
JSON encodable dictionaries must have string/unicode keys File "/data/TestingMonitoring/github_core/WMCore/src/python/WMCore/WorkerThreads/BaseWorkerThread.py", line 160, in __call__
self.algorithm(parameters)
File "/data/TestingMonitoring/github_core/WMCore/src/python/WMComponent/AnalyticsDataCollector/AnalyticsPoller.py", line 91, in algorithm
self.localSummaryCouchDB.uploadData(requestDocs)
File "/data/TestingMonitoring/github_core/WMCore/src/python/WMCore/Services/WMStats/WMStatsWriter.py", line 56, in uploadData
return self.couchDB.commit(returndocs = True)
File "/data/TestingMonitoring/github_core/WMCore/src/python/WMCore/Database/CMSCouch.py", line 260, in commit
retval = self.post(uri , data)
File "/data/TestingMonitoring/github_core/WMCore/src/python/WMCore/Services/Requests.py", line 110, in post
encode, decode, contentType)
File "/data/TestingMonitoring/github_core/WMCore/src/python/WMCore/Database/CMSCouch.py", line 105, in makeRequest
encode, decode,contentType)
File "/data/TestingMonitoring/github_core/WMCore/src/python/WMCore/Services/Requests.py", line 138, in makeRequest
encoder, decoder, contentType)
File "/data/TestingMonitoring/github_core/WMCore/src/python/WMCore/Services/Requests.py", line 224, in makeRequest_httplib
encoded_data = self.encode(data)
File "/data/TestingMonitoring/github_core/WMCore/src/python/WMCore/Services/Requests.py", line 456, in encode
return encoder.encode(thunked)
File "/data/TestingMonitoring/github_core/WMCore/src/python/WMCore/Wrappers/JsonWrapper/__init__.py", line 81, in encode
return cjson.encode(idict)