Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
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
calibration
pycalibration
Commits
67e1fddc
Commit
67e1fddc
authored
2 years ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Flush stdout after printing
parent
48e03999
No related branches found
No related tags found
1 merge request
!683
[Webservice] Restructure database to give more meaningful success/failure information
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webservice/serve_overview.py
+4
-4
4 additions, 4 deletions
webservice/serve_overview.py
with
4 additions
and
4 deletions
webservice/serve_overview.py
+
4
−
4
View file @
67e1fddc
...
...
@@ -231,7 +231,7 @@ class RequestHandler(BaseHTTPRequestHandler):
detector
,
instrument
,
in_folder
,
out_folder
,
report_to
,
runs
=
\
self
.
parse_calibrate_command
(
command
)
except
Exception
as
e
:
print
(
"
Failed parsing xfel-calibrate command
"
,
e
)
print
(
"
Failed parsing xfel-calibrate command
"
,
e
,
flush
=
True
)
continue
key
=
detector
if
instrument
in
detector
else
f
"
{
instrument
}
-
{
detector
}
"
# noqa
...
...
@@ -283,7 +283,7 @@ class RequestHandler(BaseHTTPRequestHandler):
detector
,
instrument
,
in_folder
,
out_folder
,
report_to
,
runs
=
\
self
.
parse_calibrate_command
(
command
)
except
Exception
as
e
:
print
(
"
Failed parsing xfel-calibrate command
"
,
e
)
print
(
"
Failed parsing xfel-calibrate command
"
,
e
,
flush
=
True
)
continue
inst_records
=
last_calib
.
setdefault
(
instrument
,
[])
...
...
@@ -309,11 +309,11 @@ def run(config_file: Optional[str] = None):
with
open
(
config
[
"
web-service
"
][
"
cal-config
"
],
"
r
"
)
as
cf
:
global
cal_config
cal_config
=
yaml
.
load
(
cf
.
read
(),
Loader
=
yaml
.
FullLoader
)
print
(
'
starting server...
'
)
print
(
'
starting server...
'
,
flush
=
True
)
sconfig
=
config
[
"
server-config
"
]
server_address
=
(
sconfig
[
"
host
"
],
sconfig
[
"
port
"
])
httpd
=
HTTPServer
(
server_address
,
RequestHandler
)
print
(
'
running server...
'
)
print
(
'
running server...
'
,
flush
=
True
)
httpd
.
serve_forever
()
...
...
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