House of Fusion
Home of the ColdFusion Community

Search cf-talk

December 02, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

ColdFusion 8 directory watcher event gateway

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
hi all.
Tony
05/20/08 03:49 P
What events are you watching?
Andrew Scott
05/20/08 07:57 P
exsqueeze me :)
Tony
05/20/08 10:01 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tony
05/20/2008 03:49 PM

hi all. i have an event gateway test app using the directory watcher and its working, i have it setup to send me an email everytime a file changes.. problem is, is that im testing with a simple text file, and when i make a change and save the file, i get two emails :( one email for the previous change, and one email for the current change. if i do it again, same thing.  one email that matches the previous email, and one new one. ideas? thanks! tony -- 'Never have anything in your life that you can't walk out on in thirty seconds flat, if you spot the heat coming around the corner' robert deniro - heat (1995)

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andrew Scott
05/20/2008 07:57 PM

What events are you watching? Editing a file, deletes then recreates from memory. So you will get two emails if you are watching both these events. On Wed, May 21, 2008 at 5:48 AM, Tony <tonyweeg@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tony
05/20/2008 10:01 PM

exsqueeze me :) im watching the "onChange" event. and having it send me an email. so, what you are saying is that i need to turn the onDelete event off and that will stop the behaviour i am seeing? because the ACT of editing a file in "system speak" is a deletion then a re-creation from memory? wow, i figured it was something odd like that. and even more odd.  if i put more time between the editing of the file, it sometimes WOULDNT do two events, and only would do one event.  wonder why? thanks tony On Tue, May 20, 2008 at 7:55 PM, Andrew Scott <andrew.scott@aegeon.com.au> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andrew Scott
05/21/2008 12:39 AM

Well, thats weird. I am going to assume that there is a timer for the watching of the directory then, not sure on that. But your problem is a weird one, I suggested the delete event because I got caught in .Net for that once before so was curious if this was the case here. On Wed, May 21, 2008 at 12:00 PM, Tony <tonyweeg@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tony
05/21/2008 09:57 AM

i dont believe that its a timer. that would be weird... here is the 1st email i get... for a file that just changed a few minutes ago... ==================================================== A file has been changed. struct   CFCMETHOD   onChange    CFCPATH   S:\reports\version4.0\cfc\root_productionCodeMover.cfc    DATA   struct   FILENAME   s:\reports\version4.0\shorty.txt    LASTMODIFIED   {ts '2008-05-20 15:30:26'}    TYPE   CHANGE    GATEWAYID   ProductionCodeMover_root    GATEWAYTYPE   FileWatcher    ORIGINATORID   [empty string]    ==================================================== and here is the 2nd email that i get... ==================================================== A file has been changed. struct   CFCMETHOD   onChange    CFCPATH   S:\reports\version4.0\cfc\root_productionCodeMover.cfc    DATA   struct   FILENAME   s:\reports\version4.0\shorty.txt    LASTMODIFIED   {ts '2008-05-21 09:53:39'}    TYPE   CHANGE    GATEWAYID   ProductionCodeMover_root    GATEWAYTYPE   FileWatcher    ORIGINATORID   [empty string]    ==================================================== what the effffff????/ thanks for any insight! tony On Wed, May 21, 2008 at 12:38 AM, Andrew Scott <andrew.scott@aegeon.com.au> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tony
05/21/2008 10:39 AM

ok, i figured it out :) i think. basically i had the timer set for 10 milliseconds ... way too much and too fast. so, ive set it to 5 seconds and all is working as expected! thanks! tony On Wed, May 21, 2008 at 9:56 AM, Tony <tonyweeg@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists