Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Sen2Chain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
ESPACE-DEV
Sen2Chain
Commits
3ed3f1de
Commit
3ed3f1de
authored
1 year ago
by
George Ge
Committed by
Thomas Germain
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Does multiprocessing in sen2chain work within "Python Virtual Env" ?"
parent
43c9b407
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sen2chain/jobs.py
+2
-1
2 additions, 1 deletion
sen2chain/jobs.py
sen2chain/multi_processing.py
+2
-1
2 additions, 1 deletion
sen2chain/multi_processing.py
with
4 additions
and
2 deletions
sen2chain/jobs.py
+
2
−
1
View file @
3ed3f1de
...
@@ -11,6 +11,7 @@ import datetime, time
...
@@ -11,6 +11,7 @@ import datetime, time
from
itertools
import
chain
,
groupby
from
itertools
import
chain
,
groupby
import
re
import
re
import
setuptools
import
setuptools
import
sys
from
crontab
import
CronTab
from
crontab
import
CronTab
from
collections
import
OrderedDict
from
collections
import
OrderedDict
from
configparser
import
ConfigParser
from
configparser
import
ConfigParser
...
@@ -391,7 +392,7 @@ class Job:
...
@@ -391,7 +392,7 @@ class Job:
job
.
enable
()
job
.
enable
()
else
:
else
:
job
=
self
.
_cron
.
new
(
job
=
self
.
_cron
.
new
(
command
=
"
/usr/bin/python3
"
+
str
(
self
.
_python_script_path
),
command
=
sys
.
executable
+
"
"
+
str
(
self
.
_python_script_path
),
comment
=
"
sen2chain_job_
"
+
self
.
jid
,
comment
=
"
sen2chain_job_
"
+
self
.
jid
,
)
)
if
self
.
timing
:
if
self
.
timing
:
...
...
This diff is collapsed.
Click to expand it.
sen2chain/multi_processing.py
+
2
−
1
View file @
3ed3f1de
...
@@ -5,6 +5,7 @@ import os, signal
...
@@ -5,6 +5,7 @@ import os, signal
import
time
import
time
import
logging
import
logging
from
functools
import
partial
from
functools
import
partial
import
sys
# import psutil
# import psutil
...
@@ -27,7 +28,7 @@ def multi(product_copyl2asideproducts):
...
@@ -27,7 +28,7 @@ def multi(product_copyl2asideproducts):
if
l1c
.
processable_to_l2a
():
if
l1c
.
processable_to_l2a
():
cmd
=
[
cmd
=
[
"
setsid
"
,
"
setsid
"
,
"
/usr/bin/python3
"
,
sys
.
executable
,
fwd
+
"
/multiprocess_l2a.py
"
,
fwd
+
"
/multiprocess_l2a.py
"
,
product
,
product
,
str
(
copy_l2a_sideproducts
),
str
(
copy_l2a_sideproducts
),
...
...
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