Skip to content

Commit

Permalink
[k8s] Fixed bug between threads when there are multiple executions
Browse files Browse the repository at this point in the history
  • Loading branch information
macarronesc committed Aug 2, 2024
1 parent c690601 commit 3cdb8d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lithops/serverless/backends/k8s/entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
import time
import requests
from functools import partial
from multiprocessing import Value
from threading import Thread
from multiprocessing import Value, Process

from lithops.version import __version__
from lithops.utils import setup_lithops_logger, b64str_to_dict
Expand Down Expand Up @@ -178,7 +177,7 @@ def callback_work_queue(ch, method, properties, body):
with running_jobs.get_lock():
running_jobs.value -= processes_to_start

Thread(target=run_job_k8s_rabbitmq, args=([message])).start()
Process(target=run_job_k8s_rabbitmq, args=(message,)).start()

ch.basic_ack(delivery_tag=method.delivery_tag)

Expand Down

0 comments on commit 3cdb8d9

Please sign in to comment.