Door Games Unlimited

Welcome, Guest.


Subject: Re: JSON database Date: Mon Sep 29 2014 13:57:14
From: echicken To: Kirkman

  Re: Re: JSON database
  By: Kirkman to echicken on Mon Sep 29 2014 12:02:42

 Ki> I'd like to do this reloading on demand (I only scrape new data once or
 Ki> twice an hour), rather than have a script constantly running. So tonight
 Ki> I'm going to see if I can pull some of the bits from json-svc-ctrl.js into
 Ki> a new script that I could call from the command line to reload sportsstats
 Ki> json data.

Overwriting the .json file will probably work.  The sequence of events will be
important.  I imagine it'll be fine if you "close" the DB module, overwrite the
file, then reload the DB module.

Another option would be to make a script like the one I described, but run it
as a timed event (or have your Python script kick it off after it creates its
JSON file) instead of as a module service.  That way it wouldn't be constantly
running, and could update your DB as needed.

---
echicken
electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
 ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com

Previous Message       Next Message
In Reply To: Re: JSON database (Kirkman)
Replies: Re: JSON database (Kirkman)