Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GstLAL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lscsoft
GstLAL
Commits
ce9e3c6d
Commit
ce9e3c6d
authored
9 months ago
by
Prathamesh Joshi
Committed by
Prathamesh Joshi
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Modified index method to get a rule from proxy methods
parent
d544a89b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!598
Encode job and analysis tag in the URLs created by gstlal servers
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gstlal-inspiral/bin/gstlal_inspiral
+14
-8
14 additions, 8 deletions
gstlal-inspiral/bin/gstlal_inspiral
gstlal-inspiral/bin/gstlal_ll_inspiral_trigger_counter
+12
-3
12 additions, 3 deletions
gstlal-inspiral/bin/gstlal_ll_inspiral_trigger_counter
with
26 additions
and
11 deletions
gstlal-inspiral/bin/gstlal_inspiral
+
14
−
8
View file @
ce9e3c6d
...
...
@@ -224,6 +224,18 @@ def service_domain(gracedb_search, gracedb_pipeline):
return
"%
s_
%
s.
%
s
"
%
(
gracedb_pipeline.lower
(),
gracedb_search.lower
(),
servicediscovery.DEFAULT_SERVICE_DOMAIN
)
def
get_rule_from_proxy_route
(
route
)
:
#
Method
to
trace
back
the
rules
defined
#
by
a
PROXY
method
from
the
GET
methods
#
of
the
original
application
if
route.method
!=
'
PROXY
'
:
raise
ValueError
("
The
route
provided
is
not
a
PROXY
route
")
#
Make
sure
we
only
consider
GET
methods
#
Make
sure
we
don
'
t
create
links
back
here
original_rules =
[r.rule
for
r
in
route.config
()['
mountpoint.target
'].
routes
if
r.method =
=
"
GET
"
and
r.rule
not
in
("/",
"/
index.html
")]
return
[
route.config
()['
mountpoint.prefix
'][
:-1
]
+
r
for
r
in
original_rules
]
#
[
:-1
]
removes
a
/
at
the
end
#
#
=============================================================================
#
...
...
@@ -687,14 +699,8 @@ for output_file_number, (svd_bank_url_dict, output_url, ranking_stat_output_url,
netloc = bottle.request.urlparts[1]
server_address = "http://%s" % netloc
yield "
<html><body>
\n
<h3>
%s %s %s %s
</h3>
\n
<p>
\n" % (job_tag, os.environ.get("GSTLAL_LL_JOB"), netloc, " ".join(sorted(instruments)))
for route in sorted(bottle.default_app().routes, key = lambda route: route.rule):
# don't create links back to this page
if route.rule in ("/", "/index.html"):
continue
# only create links for GET methods
if route.method != "GET":
continue
yield "
<a
href=
\"%s%s\"
>
%s
</a><br>
\n" % (server_address, route.rule, route.rule)
for rule in sorted(get_rule_from_proxy_route(modified_app.routes[0])):
yield "
<a
href=
\"%s%s\"
>
%s
</a><br>
\n" % (server_address, rule, rule)
yield "
</p>
\n
</body></html>
"
# FIXME: get service-discovery working, then don't do this
if "GSTLAL_LL_JOB" in os.environ:
...
...
This diff is collapsed.
Click to expand it.
gstlal-inspiral/bin/gstlal_ll_inspiral_trigger_counter
+
12
−
3
View file @
ce9e3c6d
...
...
@@ -263,12 +263,21 @@ if __name__ == '__main__':
ZLC
=
ZeroLagCounts
(
options
)
#
# Stuff to handle bottle route to retrieve xml doc with new counts
# Create a new, empty, Bottle application and make it the current
# default. The Bottle routes defined in various parts of the code
# will get added to this app.
# Simultaneously, create a new Bottle application and mount the
# default app's modified routes to this app. This app will be
# explicitly passed to the http server(s) to serve it up.
#
bottle
.
default_app
.
push
()
default_app
=
bottle
.
default_app
.
push
()
modified_app
=
bottle
.
Bottle
()
modified_app
.
mount
(
f
"
/
{
options
.
tag
}
/
"
,
default_app
)
bottle
.
route
(
'
/zerolag_rankingstatpdf.xml
'
)(
ZLC
.
web_get_zerolag_rankingstatpdf
)
httpservers
=
httpinterface
.
HTTPServers
(
bottle_app
=
modified_app
,
service_name
=
"
%s.gstlal_ll_inspiral_trigger_counter
"
%
(
base64
.
urlsafe_b64encode
(
uuid
.
uuid4
().
bytes
)),
service_domain
=
service_domain
(
options
.
gracedb_search
,
options
.
gracedb_pipeline
),
service_properties
=
{
...
...
@@ -278,7 +287,7 @@ if __name__ == '__main__':
service_discovery
=
False
,
#FIXME
verbose
=
options
.
verbose
)
open
(
"
gstlal_ll_inspiral_trigger_counter_registry.txt
"
,
"
w
"
).
write
(
"
http://%s:%s/
\n
"
%
(
socket
.
gethostname
(),
httpservers
[
0
][
0
].
port
))
open
(
"
gstlal_ll_inspiral_trigger_counter_registry.txt
"
,
"
w
"
).
write
(
"
http://%s:%s/
%s/
\n
"
%
(
socket
.
gethostname
(),
httpservers
[
0
][
0
].
port
,
options
.
tag
))
# set up logging
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment