Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
32a12714
Commit
32a12714
authored
5 years ago
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused variables.
Cleanup conditional code.
parent
62ed554f
master
dist-0.4.63
erp5-vifib-print-and-hashseed
feat/activities-clean-shutdown
feat/bt_xml_zope2_zope4
feat/coverage
feat/line-report-parrallel
feat/monaco-ruff
feat/note_before_migration
feat/pdm_measure_cell_range
feat/py2zope4
feat/restricted_collections
feat/simplemde
feat/simplemde-text-editor
fix/configurator_consistency
fix/enable-xml-rpc
fix/erp5testnode-build-failures
fix/hashseed
fix/testnode_proctitle
fix/trial_balance_empty_gap
for_testrunner_1
py2zope4
tmp/constructUrlFor
tmp/rjs-translations
wip/cmf_activity_runtime_grouped
wip/configurator_trade
wip/copy_reg_NamedAssignment
wip/corporate_cloudooo_fonts
wip/empty_criterion
wip/feat/payment_transaction_group_ERPJS
wip/interpolation_0_rebase
wip/loyalty_with_tml
wip/neo
wip/quick_erp5_test
wip/seleniumserver
wip/stock_browser
wip/testUpgradeInstanceWithOldDataFs_reference_json
zope4py2
zope4py2b
zope4py3
zope4py3-before-arnaud-rebase
zope4py3-bt-protocol1onpy3
zope4py3-rebase-starting-point
zope4py3-tmp
zope4py3-wip
wip/configurator_trade_old
erp5.util-0.4.64
erp5.util-0.4.63
erp5.util-0.4.62
erp5.util-0.4.61
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
15 deletions
+5
-15
erp5/util/testnode/SlapOSMasterCommunicator.py
erp5/util/testnode/SlapOSMasterCommunicator.py
+5
-15
No files found.
erp5/util/testnode/SlapOSMasterCommunicator.py
View file @
32a12714
...
@@ -187,7 +187,6 @@ class SlapOSMasterCommunicator(object):
...
@@ -187,7 +187,6 @@ class SlapOSMasterCommunicator(object):
state
=
INSTANCE_STATE_UNKNOWN
state
=
INSTANCE_STATE_UNKNOWN
monitor_information_dict
=
{}
monitor_information_dict
=
{}
info_created_at
=
"-1"
is_slave
=
instance
[
'portal_type'
]
==
"Slave Instance"
is_slave
=
instance
[
'portal_type'
]
==
"Slave Instance"
if
is_slave
:
if
is_slave
:
if
len
(
instance
[
'getConnectionXmlAsDict'
])
>
0
:
if
len
(
instance
[
'getConnectionXmlAsDict'
])
>
0
:
...
@@ -196,24 +195,15 @@ class SlapOSMasterCommunicator(object):
...
@@ -196,24 +195,15 @@ class SlapOSMasterCommunicator(object):
# not slave
# not slave
instance_state
=
news
instance_state
=
news
if
instance_state
.
get
(
'created_at'
,
'-1'
)
!=
"-1"
:
if
instance_state
.
get
(
'created_at'
,
'-1'
)
!=
"-1"
:
# the following does NOT take TZ into account
instance_text
=
instance_state
[
'text'
]
created_at
=
datetime
.
datetime
.
strptime
(
instance_state
[
'created_at'
],
'%a, %d %b %Y %H:%M:%S %Z'
)
gmt_now
=
datetime
.
datetime
(
*
time
.
gmtime
()[:
6
])
info_created_at
=
'%s (%d)'
%
(
if
instance_text
.
startswith
(
'#access Instance correctly stopped'
):
instance_state
[
'created_at'
],
(
gmt_now
-
created_at
).
seconds
)
if
instance_state
[
'text'
].
startswith
(
'#access'
):
state
=
INSTANCE_STATE_STARTED
state
=
INSTANCE_STATE_STARTED
elif
instance_text
.
startswith
(
'#access'
):
if
instance_state
[
'text'
].
startswith
(
'#access Instance correctly stopped'
):
state
=
INSTANCE_STATE_STOPPED
state
=
INSTANCE_STATE_STOPPED
elif
instance_text
.
startswith
(
'#destroy'
):
if
instance_state
[
'text'
].
startswith
(
'#destroy'
):
state
=
INSTANCE_STATE_DESTROYED
state
=
INSTANCE_STATE_DESTROYED
elif
instance_text
.
startswith
(
'#error'
):
if
instance_state
[
'text'
].
startswith
(
'#error'
):
state
=
INSTANCE_STATE_STARTED_WITH_ERROR
state
=
INSTANCE_STATE_STARTED_WITH_ERROR
if
state
==
INSTANCE_STATE_STARTED_WITH_ERROR
:
if
state
==
INSTANCE_STATE_STARTED_WITH_ERROR
:
...
...
This diff is collapsed.
Click to expand it.
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