Dents6679 / LSTMusic

A Web-Based Melody Extender: My final year University project.
1 stars 0 forks source link

Backend Doesn't seem to support multithreading & cannot generate melodies. #12

Closed Dents6679 closed 7 months ago

Dents6679 commented 7 months ago

So, i've finally hosted my backend online. woo! The flask server starts itself up on pythonanywhere and can respond to messages and requests with no issue.

The backend is able to receive expansion requests, and saves the requested melody correctly, but unfortunately seems to be unable to actually generate the melody.

I think it may have something to do with pythonanywhere and multithreading, see the screenshot below. image

I have a couple of options here [] See if the web server can be converted into an 'always on' task. [] Host it elsewhere (what a pain...)

I'll hopefully be able to resolve this and will close the issue with whatever solution I eventually found. I'm THIS close to getting this all working!!!!!!

Dents6679 commented 7 months ago

Definitely threading issues: image

Dents6679 commented 7 months ago

Tried hosting it as an always on task and got the 'this is a development server' message. Turns out the py file needs to be a WSGI file, which makes sense...

Thinking of using Celery as a task queue to handle a backend processing, rather than getting the web server to do it.

Dents6679 commented 7 months ago

Moved backend over to a Linux server which supports multithreading.

That was a pain.

Closed