Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 7:06 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: September 13th, 2008, 9:50 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Ryan,

Here's a stab in the dark.

Run your Opus code under a 'while' condition. Something as simple as a Publ. variable multiplied by minus one on the outbound request, and multiply again by minus one when the 'get data' segment is completed (use a bit from the DB or a fixed value at the end of the getinternetdata stream.)

The idea being completion of the retrieved data sets the condition to true. And the outbound request sets it to false. Maybe? Sort-of a crude 'handshake'.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: September 13th, 2008, 8:55 pm 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Try something like this; See the code added between the hash symbols.
I've added a loop that will force the main loop to stop and wait for the DB to return something non zero.
if the variable "HireReadActionStackStatus" is non zero the inner loop will break into the main loop.
You might have to adjust the if statement (and the initial reset to 0) to allow for db error messages or whatever return you are expecting from the DB.
I've used this technique successfully before, but not with the InternetPostData function. Hopefully Opus won't hang on the DB return.

function HireReadActionStack(){
var HireReadActionStackObj = new Object()
ca_action_db="get_hire_active_stack_from_db"
ca_debug_tracker = 121
HireReadActionStackObj.ca_action_db=ca_action_db
HireReadActionStackObj.ca_active_table=ca_active_table
HireReadActionStackObj.ca_username_opp=ca_username_opp
HireReadActionStackObj.ca_username=ca_username
ca_debug_tracker = 122

//##########################################

var HireReadActionStackStatus = 0;
var HireReadActionStackStatus = InternetPostData(DB_URL,HireReadActionStackObj,true)
while(true){
if(HireReadActionStackStatus!=0){break;} // break from inner loop
Debug.trace("waiting...\n");
wait(0.25);
}

//#########################################

ca_debug_tracker = 123
action = HireReadActionStackStatus.action
card_id = String.number(HireReadActionStackStatus.card_id)
slot = String.number(HireReadActionStackStatus.slot)
ca_debug_tracker = 124


cheers
Paul


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group