Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-sla-management
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-sla-management
Commits
625e0e68
Commit
625e0e68
authored
Nov 20, 2014
by
jago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed traffic light sweeper
parent
02b9d7b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
intranet-sla-management-procs.tcl
tcl/intranet-sla-management-procs.tcl
+8
-7
No files found.
tcl/intranet-sla-management-procs.tcl
View file @
625e0e68
...
...
@@ -355,6 +355,7 @@ ad_proc -public im_sla_ticket_solution_time_sweeper {
the limit is set to 100 by default.
}
{
ns_log Notice
"im_sla_ticket_solution_time_sweeper: starting"
set traffic_light_limit
[
expr
$limit
* 1000
]
# Make sure that only one thread is calculating at a time
if
{[
nsv_incr intranet_sla_management sweeper_p
]
> 1
}
{
...
...
@@ -374,7 +375,7 @@ ad_proc -public im_sla_ticket_solution_time_sweeper {
# Catch errors calculating the green/yellow/red status of tickets
if
{[
catch
{
append result
[
im_sla_ticket_traffic_light_sweeper_helper -debug_p
$debug
_p -ticket_id
$ticket
_id -limit
$limit
]
append result
[
im_sla_ticket_traffic_light_sweeper_helper -debug_p
$debug
_p -ticket_id
$ticket
_id -limit
$
traffic
_light_
limit
]
}
err_msg
]}
{
ns_log Error
"im_sla_ticket_solution_time_sweeper: traffic light status: Found error:
$err
_msg"
append result
"<pre>
$err
_msg</pre>"
...
...
@@ -393,6 +394,7 @@ ad_proc -public im_sla_ticket_solution_time_sweeper {
ad_proc -public im_sla_ticket_traffic_light_sweeper_helper
{
{
-debug_p 0
}
{
-ticket_id
""
}
{
-limit
""
}
}
{
Calculates the green/yellow/red status of tickets depending on
solution time and SLA parameters.
...
...
@@ -453,6 +455,10 @@ ad_proc -public im_sla_ticket_traffic_light_sweeper_helper {
"
}
if
{
""
!=
$limit
&& 0 !=
$limit
}
{
append open_tickets_sql
"
\t\t\t
LIMIT
$limit
\n
"
}
# ---------------------------------------
# Load the list of sla_parameters into a hash per sla_id
#
...
...
@@ -485,8 +491,6 @@ ad_proc -public im_sla_ticket_traffic_light_sweeper_helper {
}
}
# ad_return_complaint 1 "value_fields=$value_fields<br>[array get max_resolution_hours_hash
]
"
# ---------------------------------------
# Loop through all open tickets and check for the SLA parameters of their SLA
#
...
...
@@ -517,7 +521,6 @@ ad_proc -public im_sla_ticket_traffic_light_sweeper_helper {
foreach field
$value
_fields
{
set cmd
"set
$field
\$
${field}
_hash(
\$
key)"
eval
$cmd
# ad_return_complaint 1 "
cmd=$cmd<br>field=
[
expr
"
\$
$field
"
]
<br> mx=$max_resolution_hours_hash
(
$key
)
"
}
# This breaks out of the foreach perm
$permutations
loop
set found_p 1
...
...
@@ -559,16 +562,14 @@ ad_proc -public im_sla_ticket_traffic_light_sweeper_helper {
where project_id = :ticket_id
"
}
}
ns_log Notice
"im_sla_ticket_traffic_light_sweeper_helper: finished"
return
$color
return
}
ad_proc -public im_sla_ticket_solution_time_sweeper_helper
{
{
-debug_p 0
}
{
-ticket_id
""
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment