Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[k8s] Fixed bug between threads when there are multiple executions #1392

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

### Fixed
- [Storage] Fixed "KeyError: 'monitoring_interval'" error when instantiating Storage() class
- [k8s] Fixed bug between threads when there are multiple executions


## [v3.4.1]
Expand Down
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