Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /usr/lib/python2.7/site-packages/pymongo/collection.py (Line: 359)
- Function: insert
- 352 if manipulate:
- 353 docs = [self.__database._fix_incoming(doc, self) for doc in docs]
- 354
- 355 safe, options = self._get_write_mode(safe, **kwargs)
- 356 self.__database.connection._send_message(
- 357 message.insert(self.__full_name, docs,
- 358 check_keys, safe, options,
- 359 ==> continue_on_error, self.__uuid_subtype), safe)
- 360
- 361 ids = [doc.get("_id", None) for doc in docs]
- 362 return return_one and ids[0] or ids
- 363
- 364 def update(self, spec, document, upsert=False, manipulate=False,
- 365 safe=None, multi=False, check_keys=True, **kwargs):
- Variables:
- safe = False
- check_keys = True
- docs = []
- return_one = False
- self = Collection(Database(Connection('localhost', 27017), u'noc'), u'noc.cache.selector.tmp')
- kwargs = {}
- continue_on_error = False
- doc_or_docs = []
- options = {}
- manipulate = True
- ------------------------------------------------------------------------
- File: /opt/noc/sa/jobs/refresh_selector_cache.py (Line: 47)
- Function: handler
- 40 "vc_domain": vcd_map.get(s.id)
- 41 }
- 42 ]
- 43 # Write temporary cache
- 44 self.info("Writing cache")
- 45 tmp = self.cache + ".tmp"
- 46 c = get_db()[tmp]
- 47 ==> c.insert(r)
- 48 # Substitute cache
- 49 c.rename(self.cache, dropTarget=True)
- 50 #
- 51 return True
- 52
- 53 @classmethod
- Variables:
- tmp = 'noc.cache.selector.tmp'
- c = Collection(Database(Connection('localhost', 27017), u'noc'), u'noc.cache.selector.tmp')
- self = <noc.sa.jobs.refresh_selector_cache.RefreshSelectorCacheJob object at 0x7f86302c8a90>
- args = ()
- r = []
- kwargs = {}
- vcd_map = {}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 242)
- Function: _job_wrapper
- 235 t.start()
- 236 else:
- 237 return self._job_wrapper(job, **kwargs)
- 238
- 239 def _job_wrapper(self, job, **kwargs):
- 240 tb = None
- 241 try:
- 242 ==> r = job.handler(**kwargs)
- 243 except Exception:
- 244 error_report()
- 245 job.on_exception()
- 246 s = job.S_EXCEPTION
- 247 tb = get_traceback()
- 248 else:
- Variables:
- job = <noc.sa.jobs.refresh_selector_cache.RefreshSelectorCacheJob object at 0x7f86302c8a90>
- tb = None
- self = <noc.main.scheduler.scheduler.JobScheduler object at 0x4024410>
- kwargs = {}
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment