Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/pymongo-2.3-py2.6-linux-x86_64.egg/pymongo/collection.py (Line: 315)
- Function: insert
- 308 if manipulate:
- 309 docs = [self.__database._fix_incoming(doc, self) for doc in docs]
- 310
- 311 safe, options = self._get_safe_and_lasterror_options(safe, **kwargs)
- 312 self.__database.connection._send_message(
- 313 message.insert(self.__full_name, docs,
- 314 check_keys, safe, options,
- 315 ==> continue_on_error, self.__uuid_subtype), safe)
- 316
- 317 ids = [doc.get("_id", None) for doc in docs]
- 318 return return_one and ids[0] or ids
- 319
- 320 def update(self, spec, document, upsert=False, manipulate=False,
- 321 safe=None, multi=False, _check_keys=False, **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 0x3cd6f90>
- args = ()
- r = []
- kwargs = {}
- vcd_map = {}
- ------------------------------------------------------------------------
- File: /opt/noc/lib/scheduler/scheduler.py (Line: 239)
- Function: _job_wrapper
- 232 t.start()
- 233 else:
- 234 return self._job_wrapper(job, **kwargs)
- 235
- 236 def _job_wrapper(self, job, **kwargs):
- 237 tb = None
- 238 try:
- 239 ==> r = job.handler(**kwargs)
- 240 except Exception:
- 241 error_report()
- 242 job.on_exception()
- 243 s = job.S_EXCEPTION
- 244 tb = get_traceback()
- 245 else:
- Variables:
- job = <noc.sa.jobs.refresh_selector_cache.RefreshSelectorCacheJob object at 0x3cd6f90>
- tb = None
- self = <noc.main.scheduler.scheduler.JobScheduler object at 0x3c1bfd0>
- kwargs = {}
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement