Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 June 22, 2010 18:11:26

W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Random


Hello Guys,

I have a system that generate graphs and files .dat. However, i'm
having a problem, when two people access the system simultaneously may
happen that the graph of a person to replace the second person, what
can I do to make it not happen?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 22, 2010 18:23:08

Javier G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Random


On Tue, Jun 22, 2010 at 12:11 PM, Waleria <waleriantu...@gmail.com> wrote:
> I have a system that generate graphs and files .dat. However,  i'm
> having a problem, when two people access the system simultaneously may
> happen that the graph of a person to replace the second person, what
> can I do to make it not happen?


you have to get some way to keep both users separate. one approach
would be to create DB records for each task, and use the record ID as
part of the file name. another would be to use the session ID.


--
Javier

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 June 22, 2010 18:30:40

W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Random


my application doesn't use DB....not able to do this without using the
Random? ... without DB?

On 22 jun, 14:22, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
> On Tue, Jun 22, 2010 at 12:11 PM, Waleria <waleriantu...@gmail.com> wrote:
> > I have a system that generate graphs and files .dat. However,  i'm
> > having a problem, when two people access the system simultaneously may
> > happen that the graph of a person to replace the second person, what
> > can I do to make it not happen?
>
> you have to get some way to keep both users separate.  one approach
> would be to create DB records for each task, and use the record ID as
> part of the file name.  another would be to use the session ID.
>
> --
> Javier

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 June 22, 2010 19:01:09

o.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Random


Name each person's files using:

import uuid
filename = uuid.uuid4()


On Jun 22, 11:30 am, Waleria <waleriantu...@gmail.com> wrote:
> my application doesn't use DB....not able to do this without using the
> Random? ... without DB?
>
> On 22 jun, 14:22, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
>
> > On Tue, Jun 22, 2010 at 12:11 PM, Waleria <waleriantu...@gmail.com> wrote:
> > > I have a system that generate graphs and files .dat. However,  i'm
> > > having a problem, when two people access the system simultaneously may
> > > happen that the graph of a person to replace the second person, what
> > > can I do to make it not happen?
>
> > you have to get some way to keep both users separate.  one approach
> > would be to create DB records for each task, and use the record ID as
> > part of the file name.  another would be to use the session ID.
>
> > --
> > Javier

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 June 22, 2010 19:18:35

Waléria A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Random


i don't understand...

On Tue, Jun 22, 2010 at 3:01 PM, orokusaki <flashdesign...@gmail.com> wrote:

> Name each person's files using:
>
> import uuid
> filename = uuid.uuid4()
>
>
> On Jun 22, 11:30 am, Waleria <waleriantu...@gmail.com> wrote:
> > my application doesn't use DB....not able to do this without using the
> > Random? ... without DB?
> >
> > On 22 jun, 14:22, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
> >
> > > On Tue, Jun 22, 2010 at 12:11 PM, Waleria <waleriantu...@gmail.com>
> wrote:
> > > > I have a system that generate graphs and files .dat. However, i'm
> > > > having a problem, when two people access the system simultaneously
> may
> > > > happen that the graph of a person to replace the second person, what
> > > > can I do to make it not happen?
> >
> > > you have to get some way to keep both users separate. one approach
> > > would be to create DB records for each task, and use the record ID as
> > > part of the file name. another would be to use the session ID.
> >
> > > --
> > > Javier
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 June 22, 2010 19:58:03

Waléria A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Random


in my application the file .dat and the image...i save in a directory in my
computer.....so i'm having problem when two people access the same time.....

On Tue, Jun 22, 2010 at 3:01 PM, orokusaki <flashdesign...@gmail.com> wrote:

> Name each person's files using:
>
> import uuid
> filename = uuid.uuid4()
>
>
> On Jun 22, 11:30 am, Waleria <waleriantu...@gmail.com> wrote:
> > my application doesn't use DB....not able to do this without using the
> > Random? ... without DB?
> >
> > On 22 jun, 14:22, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
> >
> > > On Tue, Jun 22, 2010 at 12:11 PM, Waleria <waleriantu...@gmail.com>
> wrote:
> > > > I have a system that generate graphs and files .dat. However, i'm
> > > > having a problem, when two people access the system simultaneously
> may
> > > > happen that the graph of a person to replace the second person, what
> > > > can I do to make it not happen?
> >
> > > you have to get some way to keep both users separate. one approach
> > > would be to create DB records for each task, and use the record ID as
> > > part of the file name. another would be to use the session ID.
> >
> > > --
> > > Javier
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#7 June 22, 2010 20:53:01

Javier G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Random


On Tue, Jun 22, 2010 at 12:30 PM, Waleria <waleriantu...@gmail.com> wrote:
> my application doesn't use DB....not able to do this without using the
> Random? ... without DB?

you only need some unique identifier. it can be random, or an UUID,
if you can track it, maybe in a cookie, or passed on URL parameters,
or if you're using sessions, try the session ID. or the IP/port of
the client..... anything that can be different but consistent.

--
Javier

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 13th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support