Comments (6)
You'd really want a separate 'processing' (or tasks) thread to do this, as there are typically a bunch of plots to be done sequentially, followed by an upload. To keep life simple the processing thread wouldn't have access to the data stores, so the files to be plotted would need to be created in the main thread, then their details handed to the processing thread. I like to use queues for this sort of thing, rather than callbacks. The processing thread would just take tasks off the queue one by one, do them, and then sleep when the queue's empty.
from pywws.
Oh, yes... Can be done also like this. Keeping all this stuff into the Tasks thread.
But I think it's inconvenient to do all in order as it's done now, since it causes the livedata to be ignored for a while until CPU is ready...
from pywws.
You misunderstand - I'm not suggesting holding everything up while the plots are done (although I don't have a problem with ignoring live data for a minute or two) but you need to make sure you don't try and do half a dozen plots concurrently. So each plot needs to start after the previous one finishes, i.e. a queue.
from pywws.
Ah, sure... Keeping the order was intended.
from pywws.
I'll have a go at doing this, probably in a week or two after the next "release".
from pywws.
I've done a first go at using an uploads queue in commit ff6561. I'll add the 'service' uploads next.
from pywws.
Related Issues (20)
- WH1080 suddenly fires alarms HOT 5
- version 21.3.0 is crashing after clocks change HOT 5
- pytz dependancy but not explicitly listed HOT 14
- 70.8mm of rain, turned into 7.8mm in pywws HOT 5
- mqtt is missing records HOT 1
- Feature request for mqtt: discovery for Home Assistant HOT 1
- Talk weather HOT 3
- pywws.livelog crashed with math domain error. Impossible to relaunch. HOT 1
- No 'rain' processing should occur if old status is 'lost connection' HOT 2
- Twitter Posting HOT 6
- new version of paho-mqtt breaks mqtt messaging within pywws HOT 2
- error processing hourly HOT 2
- can't run logdata - weather station issue?
- SQLite storage optimisation HOT 5
- libusb HOT 1
- [feature] Improve detection of WS3080 HOT 5
- logdata.py: TypeError: unsupported operand type(s) for +: 'NoneType' and 'datetime.timedelta' HOT 3
- Enhancement - check for excessive change in temp_out HOT 4
- Problem to run weatherstation.py "No USB libary found" HOT 14
- Can't change station read period HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywws.