Skip to content
Snippets Groups Projects
Commit 3ed3f1de authored by George Ge's avatar George Ge Committed by Thomas Germain
Browse files

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
...@@ -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:
......
...@@ -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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment