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

server side file downloads #8

Open
Jereson2000 opened this issue Jun 14, 2023 · 0 comments
Open

server side file downloads #8

Jereson2000 opened this issue Jun 14, 2023 · 0 comments

Comments

@Jereson2000
Copy link
Collaborator

Jereson2000 commented Jun 14, 2023

Explanation:

Lets suppose we have 3 things API, backend-service (server) and frontend-service (client/worker) .

When creating a task a.k.a sending an .py file to the backend via the API the API downloads a copy for itself of the file
and the file gets to the worker in incomprehensible ways. Then if we close the server the files downloaded for the API will persist but the server will think that they have been deleted because the knowledge of these files is saved in memory. This raises and bug where if you try to create a new task with the same name you will receive an error that the task has already been created with that name but you will not see the task in the tasks list.

We discussed this issue and it was meant to implemented so that the files sent to the API are actually saved in the server side.
Here is some guidelines on how this should be implemented:

  1. The backend-service needs a method that receives files and adds them to a uploads folder.
  2. The api should have a method that receives files from users and sends them to the backend-service.
  3. The GET .../tasks should be modified from the api so that the backend-service will tell if there are any tasks available.
@Jereson2000 Jereson2000 changed the title server and API communication is not valid server side file downloads Jun 14, 2023
vahidmohsseni pushed a commit to project-fractal/WP6T62-06-mid-range-orchestration that referenced this issue Oct 22, 2023
* switch to wget

* swap stdout to stderr

* switch to hardcoded .py

* remove wget output parsing, psutil

* switch to venv from virtualenv

* remove hardcoded localhost

* server reply also if no connection to the host

* add clean exit

* switch to requests from wget

* remove psutil import

* switch to urllib

* fix reply caused bug

* remove header print

---------

Co-authored-by: Jere Lotvonen <jere.lotvonen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant