Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
strudel2_backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
hpc-team
strudel2_backend
Commits
e0501640
Commit
e0501640
authored
4 years ago
by
Chris Hines
Browse files
Options
Downloads
Patches
Plain Diff
try again to fix TWS
parent
c00d443d
Loading
Loading
4 merge requests
!77
Revert "disable agressive kill and restart"
,
!35
Dev
,
!26
Dev
,
!25
Dev
Pipeline
#10388
passed
4 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TWS/twsproxy/__init__.py
+6
-12
6 additions, 12 deletions
TWS/twsproxy/__init__.py
with
6 additions
and
12 deletions
TWS/twsproxy/__init__.py
+
6
−
12
View file @
e0501640
...
...
@@ -183,12 +183,9 @@ class TWSProxy(threading.Thread):
logger
=
logging
.
getLogger
()
closed
=
False
name
=
threading
.
current_thread
().
name
failcount
=
0
failthresh
=
10
while
not
closed
and
failcount
<
failthresh
:
while
not
closed
:
r
,
w
,
e
=
select
.
select
([
src
],[],[],
TWSProxy
.
TIMEOUT
)
if
len
(
r
)
>
0
:
failcount
=
0
buff
=
None
msglength
=
-
1
try
:
...
...
@@ -196,26 +193,23 @@ class TWSProxy(threading.Thread):
if
buff
is
None
:
continue
except
ConnectionResetError
as
e
:
close
=
True
close
d
=
True
continue
except
Exception
as
e
:
import
traceback
logger
.
error
(
traceback
.
format_exc
())
# closed = True
continue
closed
=
True
msglength
=
len
(
buff
)
if
msglength
>
0
:
TWSProxy
.
reliablesend
(
dest
,
buff
,
msglength
)
if
msglength
==
0
:
#dest.send(buff)
dest
.
shutdown
(
shuttype
)
initshutdown
.
set
()
closed
=
True
else
:
failcount
=
failcount
+
1
if
failcount
>
failthresh
:
dest
.
shutdown
(
shuttype
)
initshutdown
.
set
()
dest
.
shutdown
(
shuttype
)
initshutdown
.
set
()
def
main
():
from
.
import
server
...
...
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