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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
450fa30b
Commit
450fa30b
authored
Aug 23, 2018
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_scalability_test: Setup activity tool before test.
parent
d9ad0ce2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
0 deletions
+89
-0
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_bootstrapScalabilityTest.py
...rp5_scalability_test/ERP5Site_bootstrapScalabilityTest.py
+2
-0
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_setUpActivityTool.py
...skins/erp5_scalability_test/ERP5Site_setUpActivityTool.py
+25
-0
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_setUpActivityTool.xml
...kins/erp5_scalability_test/ERP5Site_setUpActivityTool.xml
+62
-0
No files found.
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_bootstrapScalabilityTest.py
View file @
450fa30b
...
@@ -11,6 +11,8 @@ portal_catalog = portal.portal_catalog
...
@@ -11,6 +11,8 @@ portal_catalog = portal.portal_catalog
status_code
=
0
status_code
=
0
error_message
=
"No error."
error_message
=
"No error."
context
.
ERP5Site_setUpActivityTool
()
user_quantity
=
request
.
get
(
'user_quantity'
)
user_quantity
=
request
.
get
(
'user_quantity'
)
if
user_quantity
is
None
:
return
json
.
dumps
({
"status_code"
:
1
,
"error_message"
:
"Parameter 'user_quantity' is required."
,
"password"
:
None
})
if
user_quantity
is
None
:
return
json
.
dumps
({
"status_code"
:
1
,
"error_message"
:
"Parameter 'user_quantity' is required."
,
"password"
:
None
})
password
=
''
.
join
(
random
.
choice
(
string
.
digits
+
string
.
letters
)
for
i
in
xrange
(
10
))
password
=
''
.
join
(
random
.
choice
(
string
.
digits
+
string
.
letters
)
for
i
in
xrange
(
10
))
...
...
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_setUpActivityTool.py
0 → 100644
View file @
450fa30b
if
not
context
.
portal_activities
.
isSubscribed
():
context
.
portal_activities
.
subscribe
()
context
.
portal_activities
.
manage_removeFromProcessingList
(
context
.
portal_activities
.
getProcessingNodeList
())
distribution_node
=
None
distribution_node_list
=
[]
activity_node_list
=
[]
for
node_id
in
context
.
portal_activities
.
getIdleNodeList
():
if
node_id
.
startswith
(
'activities'
):
activity_node_list
.
append
(
node_id
)
elif
node_id
.
startswith
(
'distribution'
):
distribution_node_list
.
append
(
node_id
)
activity_node_list
.
sort
()
distribution_node_list
.
sort
()
if
distribution_node_list
:
distribution_node
=
distribution_node_list
[
0
]
if
distribution_node
is
None
:
distribution_node
=
activity_node_list
[
0
]
context
.
portal_activities
.
manage_addToProcessingList
(
activity_node_list
)
context
.
portal_activities
.
manage_setDistributingNode
(
distribution_node
)
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_setUpActivityTool.xml
0 → 100644
View file @
450fa30b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_setUpActivityTool
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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