Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cryton Worker
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
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
Cryton
Cryton Worker
Commits
0319cd19
Commit
0319cd19
authored
4 years ago
by
Andrej Tomči
Committed by
Ivo Nutár
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Fix worker docker container"
parent
69d31edb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cryton_worker/lib/util.py
+0
-2
0 additions, 2 deletions
cryton_worker/lib/util.py
docker-compose.yml
+1
-1
1 addition, 1 deletion
docker-compose.yml
tests/unit_tests/test_util.py
+4
-1
4 additions, 1 deletion
tests/unit_tests/test_util.py
with
5 additions
and
4 deletions
cryton_worker/lib/util.py
+
0
−
2
View file @
0319cd19
...
...
@@ -42,7 +42,6 @@ def execute_module(relative_path: str, arguments: dict) -> dict:
raise
TypeError
(
'
Cannot parse type
"
{}
"
of data in
"
file
"'
.
format
(
type
(
file_contents
)))
logger
.
logger
.
info
(
"
Module execution finished
"
,
module_name
=
relative_path
,
arguments
=
arguments
,
ret
=
ret
)
return
ret
...
...
@@ -102,7 +101,6 @@ def validate_module(module_path: str, arguments: dict) -> dict:
ex
)}
logger
.
logger
.
info
(
"
Module validation finished
"
,
module_name
=
module_path
,
arguments
=
arguments
,
ret
=
ret
)
return
ret
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
1
−
1
View file @
0319cd19
...
...
@@ -10,4 +10,4 @@ services:
volumes
:
-
${CRYTON_WORKER_MODULES_DIR}:${CRYTON_WORKER_MODULES_DIR}
-
/dev/log:/dev/log
entrypoint
:
[
"
cryton-worker"
]
entrypoint
:
[
"
cryton-worker"
,
"
start"
,
"
--install-requirements"
]
This diff is collapsed.
Click to expand it.
tests/unit_tests/test_util.py
+
4
−
1
View file @
0319cd19
...
...
@@ -72,7 +72,10 @@ class TestUtil(TestCase):
@patch
(
'
importlib.util
'
)
def
test_import_module_missing_module
(
self
,
mock_import
):
mock_import
.
module_from_spec
.
side_effect
=
ModuleNotFoundError
(
name
=
'
test
'
)
def
raise_err
(
*
_
):
ex
=
ModuleNotFoundError
(
name
=
'
test
'
)
raise
ex
mock_import
.
module_from_spec
.
side_effect
=
raise_err
with
self
.
assertRaises
(
ModuleNotFoundError
):
util
.
import_module
(
'
test
'
)
...
...
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