Sorry about this late replay. I was thinking about your question.
Since I do not know how the data can be loaded from Perforce I cannot
be very concrete but here are some thoughts:

I would not update the data when a new session is created because this
is a very rare event.

If labels have a timestamp you can store them in a database and,
periodically, update those after a certain timestamp.

If there is not too many of them and you have a single web2py process,
you can also store them in cache.ram. cache.ram will be much faster
than db.

If there is a way to at least detect from a timestamp when the
perforce data has changed I would just check it at every request and
use it as a trigger to update the database or cache.ram based on
that.

On Dec 23, 10:08 pm, chelck <[email protected]> wrote:
> I am trying to create an application that lets a user associate the
> release version of an application with one or more labels from a
> source control system (Perforce in my case). So, the data looks
> something like:
>     my_app 1.0.0 used labels: my_lib_7.2, your_lib_5.4.0, my_app_1.0.0
>     my_app 1.0.1 used labels: my_lib_7.2, your_lib_5.4.1, my_app_1.0.1
> The idea is to make it easier to create source code difference reports
> for applications assembled from multiple in house components.
>
> The issue is that the label definitions live outside of web2py in
> Perforce's DB. Labels can be created, modified, or deleted without
> web2py knowing about it. I don't want to create Perforce triggers to
> update the Db, that would put my SCM at risk. So how should I handle
> this? I was thinking that when a user session is created that I query
> Perforce for the current set of labels and update the Db. New labels
> are just added, labels that have been deleted are marked somehow (a
> 'deleted' column?) and the various views flag deleted labels in red.
>
> Does this make sense? What's the correct place to load the data from
> my SCM, are there any examples where some similar external data is
> loaded?
>
> Thanks,
> C. Helck

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to