juanramino / comuni-service Goto Github PK
View Code? Open in Web Editor NEWItalian municipality service
Italian municipality service
I see that the command for updating data is:
cd /app/ && npm run update:comuni && pm2 restart comuni-service
So, each time the comuni was updated, the service stopped and restart.
In my opnion this is not the best way to do this, cause all the service flat out and reopen in memory all the Db, each time. Image this in a polling service. And if an error happen and the new file wasn't created? You cannot rollback or restart the service.
So i was thinking about using the --watch
option for pm2.
Think about the procedure with this parameter. The comuni.json was update (my last PR) only if there is a true changing event. And the use of the watch parameter can drop the major part of useless "stop and start" procedure.
The problem is:
In this scenario, you should have a static name for the Json, cause the watch parameter do the best watching for a file or a folder. So i propose to change the Env variable name for the file JSON in a static one (comuni.json) for example, in order to accomplish all the strategies i wrote before.
What about?
Add foreign states data:
It could be nice to find a public URL that show this data and update it ISTAT do with Italian municipality.
For now I find this data (attached)
foreign.json.txt
I see the comuniUpdater.js tests but, in my opinion these are not real tests. There are a few considerationts around this:
What's your opinion?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.