From 2305b642c38e78e65ef2e3115b74967b90c0944f Mon Sep 17 00:00:00 2001 From: Davidesba Date: Thu, 3 Nov 2022 12:40:24 +0100 Subject: [PATCH] Update random seed for python 3.11 compatibility Fix compatibility error with python 3.11: https://github.com/spotify/luigi/issues/3202 --- luigi/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luigi/worker.py b/luigi/worker.py index 8a70e60062..18cd565b8e 100644 --- a/luigi/worker.py +++ b/luigi/worker.py @@ -170,7 +170,7 @@ def run(self): # Need to have different random seeds if running in separate processes processID = os.getpid() currentTime = time.time() - random.seed((processID, currentTime)) + random.seed(processID * currentTime) status = FAILED expl = ''