Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
workflow
pypushflow
Commits
3ebd7ec6
Commit
3ebd7ec6
authored
Sep 06, 2021
by
Wout De Nolf
Browse files
flake8 linting
parent
3f8990b0
Changes
7
Hide whitespace changes
Inline
Side-by-side
pypushflow/RouterActor.py
View file @
3ebd7ec6
...
...
@@ -51,7 +51,7 @@ class RouterActor(AbstractActor):
self
.
dictValues
=
{}
def
connect
(
self
,
actor
,
expectedValue
=
"other"
):
if
expectedValue
!=
"other"
and
not
expectedValue
in
self
.
listPort
:
if
expectedValue
!=
"other"
and
expectedValue
not
in
self
.
listPort
:
raise
RuntimeError
(
"Port {0} not defined for router actor {1}!"
.
format
(
expectedValue
,
self
.
name
...
...
pypushflow/UtilsMongoDb.py
View file @
3ebd7ec6
...
...
@@ -33,7 +33,7 @@ try:
from
bson.objectid
import
ObjectId
USE_MONGODB
=
True
except
:
except
ImportError
:
print
(
"Error when trying to import pymongo and/or bson - no MongoDB connection possible"
)
...
...
pypushflow/Workflow.py
View file @
3ebd7ec6
...
...
@@ -25,7 +25,6 @@ __date__ = "28/05/2019"
import
os
import
time
import
pprint
import
logging
import
pathlib
...
...
pypushflow/test/test_threadcounteractor.py
View file @
3ebd7ec6
...
...
@@ -43,6 +43,6 @@ class TestThreadCountingActor(unittest.TestCase):
]
state
=
{
"ntasks"
:
Counter
()}
with
ThreadPoolExecutor
(
max_workers
=
10
)
as
executor
:
results
=
executor
.
map
(
lambda
w
:
w
.
trigger
(
state
),
workers3
)
executor
.
map
(
lambda
w
:
w
.
trigger
(
state
),
workers3
)
self
.
thread_counter
.
wait_threads_finished
()
self
.
assertEqual
(
state
[
"ntasks"
].
value
,
150
)
pypushflow/test/test_utilsMongoDb.py
View file @
3ebd7ec6
...
...
@@ -62,7 +62,7 @@ class TestUtilsMongoDb(unittest.TestCase):
actorId1
=
UtilsMongoDb
.
initActor
(
name
=
actorName1
,
workflowId
=
workflowId
)
self
.
assertIsNotNone
(
actorId1
)
actorName2
=
"TestActor2"
actorId2
=
UtilsMongoDb
.
initActor
(
name
=
actorName2
,
workflowId
=
workflowId
)
UtilsMongoDb
.
initActor
(
name
=
actorName2
,
workflowId
=
workflowId
)
inData
=
{
"a"
:
1
}
UtilsMongoDb
.
addDataToActor
(
workflowId
=
workflowId
,
actorId
=
actorId1
,
actorData
=
{
"inData"
:
inData
}
...
...
pypushflow/test/test_workflow2.py
View file @
3ebd7ec6
...
...
@@ -27,7 +27,6 @@ import logging
import
unittest
from
pypushflow.Workflow
import
Workflow
from
pypushflow.Submodel
import
Submodel
from
pypushflow.StopActor
import
StopActor
from
pypushflow.StartActor
import
StartActor
from
pypushflow.PythonActor
import
PythonActor
...
...
pypushflow/test/test_workflow4.py
View file @
3ebd7ec6
...
...
@@ -31,7 +31,6 @@ from pypushflow.Submodel import Submodel
from
pypushflow.StopActor
import
StopActor
from
pypushflow.StartActor
import
StartActor
from
pypushflow.PythonActor
import
PythonActor
from
pypushflow.ErrorHandler
import
ErrorHandler
from
pypushflow.ThreadCounter
import
ThreadCounter
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment