BrewPi: Copying vs Writing Web Data Files

@Elco, hopefully you remember this part of brewpi.py:

# Do not write directly to www dir to prevent blocking www file.

If the php/js is just reading the file, why was this necessary? Was it something that you found caused an issue, or was it just something you thought might?

I looked and this logic is present in v0.1 all the way to the most current version so it’s been a while. :slight_smile:

It might have something to do with that the web server is serving that file, while the script is writing to it.
I don’t remember exactly. It would be better if the python script ran a server with a proper API instead of this hacky socket communication between PHP and python that I set up.

I didn’t know any better at the time. We designed it a lot better now, and that’s what became BrewBlox. BrewPi really needed a redesign from scratch. Don’t assume that everything in the brewpi-script code is well designed :slight_smile:

Yes sir, you’ve given me that disclaimer before and I understand.

Was just hoping you might have remembered and it could save me some mistakes.

I point people here when they are looking for something that has all those capabilities, believe me. I’m just amusing myself by piddling with this and making it do what I want. Being an IT leader, I need something to keep my skills honed as I sure don’t get any practice anymore at work.

Thanks for the reply!