[rt-users] race condition with scrips updating db?

Ham MI-ID, Torsten Brumm torsten.brumm at Kuehne-Nagel.com
Wed May 7 10:20:06 EDT 2008


Hi Chris,

Hopefully you got a answer to your request already, if not try the following:

1. create a tiny scrip in which only wait for some seconds?
2. i'm not 100% sure, but try to set both scrip at the Stage to Transaction Batch

Torsten 


Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred Manke, Christian Marnetté (Stellv.),  Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Klaus-Michael Kühne


-----Ursprüngliche Nachricht-----
Von: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] Im Auftrag von Chris Haumesser
Gesendet: Montag, 14. April 2008 22:39
An: rt-users at lists.bestpractical.com
Betreff: [rt-users] race condition with scrips updating db?

Hi,

I'm using the ExtractCustomFieldValues extension to extract an email address out of the body of a message and set it as the requestor of the ticket.

My template first removes the original requestor from the ticket, then adds the new address as a requestor.  In the RT history for the ticket, I see this work correctly.

My Extraction scrip has a description '00_extract_fields' and the autoreply scrip has a description '20_autoreply_on_create'.  The scrips appear to be firing in the proper order (00_extract_fields first, then 20_autoreply_on_create).  Nevertheless, the outgoing email in the autoreply picks up the address of the first requestor.

My theory is that this is a race condition: the autoreply scrip is properly firing after the extract scrip, but the extract scrip hasn't finished updating the database by the time the autoreply scrip starts.

Is there a way to test this theory and fix the problem?


Thanks,


-C-
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com Commercial support: sales at bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com




More information about the rt-users mailing list