Makes a determination as to whether the given ObjectId was generated by the current process, based on the 5-byte random number in the ObjectId.
(oid)
| 370 | |
| 371 | |
| 372 | def oid_generated_on_process(oid): |
| 373 | """Makes a determination as to whether the given ObjectId was generated |
| 374 | by the current process, based on the 5-byte random number in the ObjectId. |
| 375 | """ |
| 376 | return ObjectId._random() == oid.binary[4:9] |
| 377 | |
| 378 | |
| 379 | def delay(sec): |