Fix ResourcesRead service by removing invalid artifactHit references
Showing
1 changed file
with
0 additions
and
25 deletions
| ... | @@ -716,33 +716,8 @@ | ... | @@ -716,33 +716,8 @@ |
| 716 | 716 | ||
| 717 | result = [contents: contents] | 717 | result = [contents: contents] |
| 718 | 718 | ||
| 719 | // Update audit record | ||
| 720 | artifactHit.runningTimeMillis = executionTime | ||
| 721 | artifactHit.wasError = "N" | ||
| 722 | artifactHit.outputSize = new JsonBuilder(result).toString().length() | ||
| 723 | |||
| 724 | ec.artifactExecution.disableAuthz() | ||
| 725 | try { | ||
| 726 | artifactHit.update() | ||
| 727 | } finally { | ||
| 728 | ec.artifactExecution.enableAuthz() | ||
| 729 | } | ||
| 730 | |||
| 731 | } catch (Exception e) { | 719 | } catch (Exception e) { |
| 732 | def executionTime = (System.currentTimeMillis() - startTime) / 1000.0 | 720 | def executionTime = (System.currentTimeMillis() - startTime) / 1000.0 |
| 733 | |||
| 734 | // Update audit record with error | ||
| 735 | artifactHit.runningTimeMillis = executionTime | ||
| 736 | artifactHit.wasError = "Y" | ||
| 737 | artifactHit.errorMessage = e.message | ||
| 738 | |||
| 739 | ec.artifactExecution.disableAuthz() | ||
| 740 | try { | ||
| 741 | artifactHit.update() | ||
| 742 | } finally { | ||
| 743 | ec.artifactExecution.enableAuthz() | ||
| 744 | } | ||
| 745 | |||
| 746 | throw new Exception("Error reading resource ${uri}: ${e.message}") | 721 | throw new Exception("Error reading resource ${uri}: ${e.message}") |
| 747 | } | 722 | } |
| 748 | ]]></script> | 723 | ]]></script> | ... | ... |
-
Please register or sign in to post a comment