Advertisement
Guest User

Untitled

a guest
Nov 12th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. START OF TRACEBACK
  2. ------------------------------------------------------------------------
  3. File: /opt/noc/contrib/lib/pymongo-2.3-py2.6-linux-x86_64.egg/pymongo/collection.py (Line: 315)
  4. Function: insert
  5. 308 if manipulate:
  6. 309 docs = [self.__database._fix_incoming(doc, self) for doc in docs]
  7. 310
  8. 311 safe, options = self._get_safe_and_lasterror_options(safe, **kwargs)
  9. 312 self.__database.connection._send_message(
  10. 313 message.insert(self.__full_name, docs,
  11. 314 check_keys, safe, options,
  12. 315 ==> continue_on_error, self.__uuid_subtype), safe)
  13. 316
  14. 317 ids = [doc.get("_id", None) for doc in docs]
  15. 318 return return_one and ids[0] or ids
  16. 319
  17. 320 def update(self, spec, document, upsert=False, manipulate=False,
  18. 321 safe=None, multi=False, _check_keys=False, **kwargs):
  19. Variables:
  20. safe = False
  21. check_keys = True
  22. docs = []
  23. return_one = False
  24. self = Collection(Database(Connection('localhost', 27017), u'noc'), u'noc.cache.selector.tmp')
  25. kwargs = {}
  26. continue_on_error = False
  27. doc_or_docs = []
  28. options = {}
  29. manipulate = True
  30. ------------------------------------------------------------------------
  31. File: /opt/noc/sa/jobs/refresh_selector_cache.py (Line: 47)
  32. Function: handler
  33. 40 "vc_domain": vcd_map.get(s.id)
  34. 41 }
  35. 42 ]
  36. 43 # Write temporary cache
  37. 44 self.info("Writing cache")
  38. 45 tmp = self.cache + ".tmp"
  39. 46 c = get_db()[tmp]
  40. 47 ==> c.insert(r)
  41. 48 # Substitute cache
  42. 49 c.rename(self.cache, dropTarget=True)
  43. 50 #
  44. 51 return True
  45. 52
  46. 53 @classmethod
  47. Variables:
  48. tmp = 'noc.cache.selector.tmp'
  49. c = Collection(Database(Connection('localhost', 27017), u'noc'), u'noc.cache.selector.tmp')
  50. self = <noc.sa.jobs.refresh_selector_cache.RefreshSelectorCacheJob object at 0x3cd6f90>
  51. args = ()
  52. r = []
  53. kwargs = {}
  54. vcd_map = {}
  55. ------------------------------------------------------------------------
  56. File: /opt/noc/lib/scheduler/scheduler.py (Line: 239)
  57. Function: _job_wrapper
  58. 232 t.start()
  59. 233 else:
  60. 234 return self._job_wrapper(job, **kwargs)
  61. 235
  62. 236 def _job_wrapper(self, job, **kwargs):
  63. 237 tb = None
  64. 238 try:
  65. 239 ==> r = job.handler(**kwargs)
  66. 240 except Exception:
  67. 241 error_report()
  68. 242 job.on_exception()
  69. 243 s = job.S_EXCEPTION
  70. 244 tb = get_traceback()
  71. 245 else:
  72. Variables:
  73. job = <noc.sa.jobs.refresh_selector_cache.RefreshSelectorCacheJob object at 0x3cd6f90>
  74. tb = None
  75. self = <noc.main.scheduler.scheduler.JobScheduler object at 0x3c1bfd0>
  76. kwargs = {}
  77. ------------------------------------------------------------------------
  78. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement