Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
slapos.core
Commits
30e3c4d7
Commit
30e3c4d7
authored
Sep 30, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Drop unused script
Old script not used anywhere
parent
25ff6c76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
117 deletions
+0
-117
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_hasContactedRecently.py
...slapos_crm_monitoring/ComputeNode_hasContactedRecently.py
+0
-17
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_hasContactedRecently.xml
...lapos_crm_monitoring/ComputeNode_hasContactedRecently.xml
+0
-62
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+0
-38
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_hasContactedRecently.py
deleted
100644 → 0
View file @
25ff6c76
compute_node
=
context
now_date
=
DateTime
()
if
(
now_date
-
compute_node
.
getCreationDate
())
<
maximum_days
:
# This compute_node was created recently skip
return
True
message_dict
=
context
.
getAccessStatus
()
# Ignore if data isn't present.
if
message_dict
.
get
(
"no_data"
,
None
)
==
1
:
message_dict
=
{}
if
'created_at'
in
message_dict
:
contact_date
=
DateTime
(
message_dict
.
get
(
'created_at'
).
encode
(
'utf-8'
))
return
(
now_date
-
contact_date
)
<
maximum_days
return
False
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/ComputeNode_hasContactedRecently.xml
deleted
100644 → 0
View file @
25ff6c76
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
maximum_days=30
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ComputeNode_hasContactedRecently
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
30e3c4d7
...
...
@@ -162,44 +162,6 @@ class TestSlapOSSupportRequestModule_getMonitoringUrlList(TestCRMSkinsMixin):
self
.
tic
()
self
.
assertNotEqual
(
instance_tree
.
getSuccessorList
(),
[])
class
TestComputeNode_hasContactedRecently
(
SlapOSTestCaseMixinWithAbort
):
def
test_ComputeNode_hasContactedRecently_newly_created
(
self
):
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
tic
()
has_contacted
=
compute_node
.
ComputeNode_hasContactedRecently
()
self
.
assertTrue
(
has_contacted
)
def
test_ComputeNode_hasContactedRecently_no_data
(
self
):
with
PinnedDateTime
(
self
,
DateTime
()
-
32
):
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
tic
()
has_contacted
=
compute_node
.
ComputeNode_hasContactedRecently
()
self
.
assertFalse
(
has_contacted
)
def
test_ComputeNode_hasContactedRecently_memcached
(
self
):
with
PinnedDateTime
(
self
,
DateTime
()
-
32
):
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
addProject
())
compute_node
.
setAccessStatus
(
""
)
self
.
tic
()
has_contacted
=
compute_node
.
ComputeNode_hasContactedRecently
()
self
.
assertTrue
(
has_contacted
)
def
test_ComputeNode_hasContactedRecently_memcached_oudated_no_spl
(
self
):
with
PinnedDateTime
(
self
,
DateTime
()
-
32
):
compute_node
,
_
=
self
.
_makeComputeNode
(
self
.
addProject
())
compute_node
.
setAccessStatus
(
""
)
self
.
tic
()
has_contacted
=
compute_node
.
ComputeNode_hasContactedRecently
()
self
.
assertFalse
(
has_contacted
)
class
TestSlapOSisSupportRequestCreationClosed
(
TestCRMSkinsMixin
):
def
afterSetUp
(
self
):
...
...
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