I have four calls to a particular tag.  Call it cf_foo.  I want to run it like so from a calling template:

<cf_foo run=1st>
<cf_foo run=2nd>
<cf_foo run=3rd>
<cf_foo run=4th>

Each instance of the tag makes a db entry as to its time of completion.  I want thes entries to always be in the same sequence; one that matches the order in which they were called.

So I got the bright idea of setting

<cfset variables.tempLockName=CreateUUID();>

and then calling each tag like this:

<cflock
name="#variables.tempLockName#"
type="EXCLUSIVE"
timeout="10">
<cf_foo run=1ST>
</cflock>
<cflock
name="#variables.tempLockName#"
type="EXCLUSIVE"
timeout="10">
<cf_foo run=2ND>
</cflock>

and so on until I'm done.  The idea was the common lock name would force serial execution (This is a scheduled task so no concurrent user access issues).  

Given the above limiting circumstances, is this a sound method of forcing stuff to be run in top-down order, or is there a better way?

--
-------------------------------------------
Matt Robertson,     [EMAIL PROTECTED]
MSB Designs, Inc. http://mysecretbase.com
-------------------------------------------

--
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to