diff options
author | ivan <ivan> | 2009-06-24 18:36:32 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-06-24 18:36:32 +0000 |
commit | 70d0d44dff39cb9235cbbec1918c4ea95f0dc4c4 (patch) | |
tree | ca1994db4491edaaba0bbd60a4b0ae82fbe4fda7 /FS/bin | |
parent | d8e19d73efa750780648146fd45fe701c70c3465 (diff) |
add support for db profiling, RT#5662
Diffstat (limited to 'FS/bin')
-rw-r--r-- | FS/bin/freeside-queued | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/FS/bin/freeside-queued b/FS/bin/freeside-queued index 2188dd404..22fd7bb5e 100644 --- a/FS/bin/freeside-queued +++ b/FS/bin/freeside-queued @@ -157,6 +157,8 @@ while (1) { forksuidsetup($user); + dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile'); + #auto-use classes... if ( $ljob->job =~ /(FS::(part_export|cust_main)::\w+)::/ || $ljob->job =~ /(FS::\w+)::/ @@ -191,6 +193,13 @@ while (1) { $ljob->delete; } + if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { + open(PROFILE,">%%%FREESIDE_LOG%%%/queueprofile.$$.".time) + or die "can't open profile file: $!"; + print PROFILE dbh->sprintProfile(); + close PROFILE or die "can't close profile file: $!"; + } + exit; #end-of-kid } |