Opened 17 years ago
Closed 17 years ago
#5310 closed (invalid)
sync database between two processes dynamically
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
if two independent processes access the same model, how to make the second process see the result immediately taken by the first process's model.save()?
I've tested multiple threads in a single process, there's no such problem.
But when with two processes, I tested with the following steps:
- in process one:
Pkg.objects.all().count()
4
- in process two:
p = Pkg(name='hi'); p.save()
- in process two:
Pkg.objects.all().count()
5
- in process one:
Pkg.objects.all().count()
4
Here's the question: How to re-retrieve the objects from the database?
Change History (2)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Please ask support questions on the django-users mailing list. The ticket tracker is for tracking bugs that need to be fixed.
Replying to wanyancan@gmail.com:
Sorry for the wrong format, here's the steps I've tested