/updateEvents.js (142275091c4c26bd8b9fedb51788e84047beaa57) (1741 bytes) (mode 100644) (type blob)
/*
This file is part of datajams-evictions.
datajams-evictions is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
datajams-evictions is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with datajams-evictions. If not, see <https://www.gnu.org/licenses/>.
Copyright 2020 Luigi Bai
*/
const DAO = require("./lib/sqlDAO");
const TM = require("./lib/TaskManager.class");
const taskName = "updateEvents";
let rowLimit = 25;
if (process.argv.length > 2) {
let n = Number(process.argv[2]);
if (!Number.isNaN(n) && n.valueOf() > 0) rowLimit = n.valueOf();
}
let opts = require("./creds")["SQLITE3"];
opts.connectCallback = database => {
let UETask = new (TM[taskName])(database);
UETask.loadTasks()
.then(rowCount => {
// Now run the tasks, given the SELECT/store is finished:
console.log("Stored", rowCount, "new tasks.");
UETask.runTasks(rowLimit)
.then(val => { console.log("Done."); })
.catch(err => { console.log("Error", err); })
.finally(() => {
// Shut down the database, and the HTTPS agent:
UETask.finalize();
DAO.disconnect(database);
require("./lib/httpOptions").getGlobalAgent().destroy();
})
;
})
.catch(err => {
console.error("Error loading tasks", err);
})
;
};
DAO.connect(opts);
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
31 |
ce60eb947708d4530bee8739c111f9c0ab750eaa |
.gitignore |
100644 |
blob |
33877 |
e37e32e4e836c2394b62c0a848c2094f687eb530 |
LICENSE |
100644 |
blob |
1171 |
354a297411cdddbe0355507766510a182aba0874 |
Promise.shim.js |
100644 |
blob |
1710 |
7dcf242a339081ab4c71cde50af7195a3eb26843 |
README.md |
100644 |
blob |
364 |
c97984072c2cd4c8daa74c3e6ff6eb0434dc5d72 |
creds.example.js |
100644 |
blob |
1410 |
bc1777db47110f7e7bfdfee7895204fbfa0f68ba |
extractFile.js |
100644 |
blob |
2009 |
530f6b3bddfca745b628f7a4a226796d17a18605 |
extractMonth.js |
040000 |
tree |
- |
f58128e0057868d554a3e2eab7c2344bb117af0b |
lib |
100644 |
blob |
5757 |
d5aebf741e6d5fe88f99b0f99831eb5e24c38a86 |
loadDockets.js |
100644 |
blob |
49735 |
4e6be3f3100b172d1571d6ddf21eeabe70876b5c |
package-lock.json |
100644 |
blob |
626 |
129b1f2d2524cefe2b3ab9aa4eacae3ad9748089 |
package.json |
100644 |
blob |
4159 |
888ba8ce11fdf4d3e1d197ef755e74ee1e7af1d9 |
schema.mssql.sql |
100644 |
blob |
3696 |
062c3cb093340952c06b7fcd84dd52422bb21714 |
schema.sqlite3.sql |
100644 |
blob |
2349 |
334eca19c709741ee6a386fe4c9527c3ac1b0b4d |
searchNames.js |
100755 |
blob |
162 |
7c25a482064c9580388f09c4d91683f3858ff7ca |
sqdump |
100644 |
blob |
1762 |
b50d6a4a406e9e3c54fbbdc8c1038c4da4bc14cd |
updateAddress.js |
100644 |
blob |
3915 |
77c7694889dcc3c422bff5c1ebc15ccd0c366e4c |
updateDates.ms.sql |
100644 |
blob |
3663 |
af9d94ba2bf7fbaf736c02e433b89248f3fbad13 |
updateDates.sqlite.sql |
100644 |
blob |
1741 |
142275091c4c26bd8b9fedb51788e84047beaa57 |
updateEvents.js |
100644 |
blob |
1744 |
173e2db9359912e78ff22c440443d6b11637bf9f |
updateStatus.js |
100644 |
blob |
6799 |
dba4385e740197b0fe1e19c89a39052ab799bdb0 |
xferData.js |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/datajams-lbai/datajams-evictions
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/datajams-lbai/datajams-evictions
Clone this repository using git:
git clone git://git.rocketgit.com/user/datajams-lbai/datajams-evictions
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main