HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] Audit hook not getting all Job events



Hi Aidan,

Just a question on some processing logic.  In the current version of our audit hook we set a failed, success or retry state based on the audit event fired.  And this state along with other information retrieved from the job file is inserted into our database.  This state decision is something that we decided on after looking at the event set for a whole lot of different fax jobs and it's worked pretty well for the most part.

Having said that I have now found out about this "state" variable in the job file which is obviously a far superior manner of determining what state the job is in.  So would it be better if moved this failed, success decision to the job_done event and use this state variable in the job file?  Additionally how would you recommend we best handle notification of this retry state?

Thanks
Dominique




On Tue, Jul 13, 2010 at 10:50 PM, Aidan Van Dyk <aidan@xxxxxxxx> wrote:
On 13 July 2010 16:46, Dominique dHotman <dominique@xxxxxxxxxxxxxx> wrote:
> I'll try the have a look at the patch tomorrow morning but in response to
> your question:
>>I'm confused... when JOB_DEAD is fired on that, is "[Job time limit
>>exceeded]" not part of the status messages in the job q-file?
>
> The status:  message in the job file is null.
> I'll let you know as soon as I've test the patch.

OK, here's an additional patch to make that error nicer if the
timed-out converter hasn't produce any output (like the sleep 6000 I
tested with):
diff --git a/faxd/faxQueueApp.c++ b/faxd/faxQueueApp.c++
index d99aad1..dcea4e6 100644
--- a/faxd/faxQueueApp.c++
+++ b/faxd/faxQueueApp.c++
@@ -1335,7 +1336,9 @@ faxQueueApp::runConverter1(Job& job, int fd,
fxStr& output)
    timer.stopTimeout();
    if (timer.wasTimeout()) {
       jobError(job, "CONVERT DOCUMENT: job time limit exceeded");
-       output.append("\n[Job time limit exceeded]\n");
+       if (output.length() > 0)
+           output.append('\n');
+       output.append("[Job time limit exceeded]\n");
       return (false);
    } else
       return (true);

a.


--
Aidan Van Dyk                                             aidan@xxxxxxxx
Senior Software Developer                          +1 215 825-8700 x8103
iFAX Solutions, Inc.                                http://www.ifax.com/




Project hosted by iFAX Solutions