Commit Graph

535 Commits

Author SHA1 Message Date
dce03ff349
crawler: Fix constraint name for word 2019-01-01 19:08:23 +10:00
c284fba339
crawler: Remove user from new list after update from data. 2019-01-01 19:02:39 +10:00
08ae044a95
server: Pass in logger to database back-end 2019-01-01 18:59:43 +10:00
0d62936e32
db.db: Log failed queries if given logger. 2019-01-01 18:58:58 +10:00
37eb6c30f6
crawler: Delete user from new list after inspection. 2019-01-01 18:46:27 +10:00
5c543ca34d
crawler: Don't try to fetch empty ID sets 2019-01-01 18:44:27 +10:00
cd1e49c28e
hadapi: Tweak profile page resolution 2019-01-01 18:41:50 +10:00
90af2bc0c5
crawler: Handle the case where no words/hostnames exist. 2019-01-01 18:37:33 +10:00
7fec985b32
crawler: Tweak ON CONFLICT statements 2019-01-01 18:23:37 +10:00
56eb34159b
crawler: Drop new user event 2019-01-01 18:14:38 +10:00
37750df658
crawler: Re-work user detail update 2019-01-01 18:13:01 +10:00
27d5c65192
hadapi: Re-work user ID scan.
This is a work-around to the fact that the API throws error 500 when you
try to retrieve the "newest" users (in spite of the fact that those are
generally the users that are of interest from a spam-prevention point of
view).

This is a last attempt to try and make this work.  Next time I just shut
down the project and let Hackaday.io drown in its spam, I spend too many
hours a week trying to clean up this crap and my own projects are
suffering because of it.
2019-01-01 18:00:13 +10:00
b57490858b
server: Fix log-in logic 2019-01-01 09:25:39 +10:00
b56cecf94d
traits.trait: Don't use ON CONFLICT for trait creation either. 2018-12-31 18:38:44 +10:00
10ee1d973a
traits: Don't rely on ON CONFLICT for trait instances.
The only primary key is the `trait_inst_id`.
2018-12-31 18:26:49 +10:00
a70758010d
server: Yield increment and discard requests. 2018-12-31 18:17:13 +10:00
a246406a05
traits.trait: Make increment/discard asynchronous. 2018-12-31 18:17:02 +10:00
0f58a18d14
traits: Re-factor for async back-end 2018-12-31 17:13:47 +10:00
290bed3798
server: Re-factor for async server back-end 2018-12-31 17:13:30 +10:00
1cd5c15870
crawler: Re-factor to use async database back-end. 2018-12-31 17:13:15 +10:00
b9fd75e075
main.js: Fix typo 2018-12-31 17:08:12 +10:00
5df82973ee
db.model: Implement get_user/get_deferral using single-row fetch 2018-12-31 17:07:38 +10:00
92366b6003
db.model.User: Add rm_groups 2018-12-31 17:07:19 +10:00
4323629c4a
db.model: Implement row refreshes. 2018-12-31 17:06:35 +10:00
b4f36fb737
db.model: Implement single-row fetches. 2018-12-31 17:06:15 +10:00
7be8c9e2c3
db.model: Fix list join
I always seem to get JavaScript's `Array.join` and Python's `str.join`
muddled.
2018-12-31 17:04:27 +10:00
70abfedbf5
db.model: Implement property getters/setters 2018-12-31 17:02:38 +10:00
f441bdc187
db.db: Skip fetching data if no data returned. 2018-12-31 17:01:33 +10:00
5361812414
db.db: Auto-connect if not already connected 2018-12-31 17:01:20 +10:00
a9262430a6
db: Replace SQLAlchemy with pscopg2.
Rather than use SQLAlchemy, which suffers from not being thread-safe
along with other failings, we'll use an ORM of our own design built on
`psycopg2`.  This will run in a separate thread.
2018-12-31 12:46:01 +10:00
4b1980ab44
main.js: Rename form variable 2018-12-29 20:17:59 +10:00
2d0a2e6376
traits.trait: Attempt to close database. 2018-12-29 20:16:15 +10:00
7cc5655467
main.js: Add field for setting fetch size. 2018-12-29 14:24:05 +10:00
66d22af6e3
traits.trait: Avoid storing initial database connection. 2018-12-29 11:57:08 +10:00
794fec42eb
traits.Trait: Add a database shutdown handler.
Seems the database sessions hang around longer than they should,
implement a class which gets nuked hopefully when the thread does.
2018-12-28 18:35:18 +10:00
bf36f3825c
traits: Use thread-local storage for database objects.
SQLAlchemy really gets confused if you get objects from different
database sessions mixed up, causing things to not be recorded when they
should.

To counteract this, use thread-local storage for the connection and its
database objects.  This necessitates that we have a way to create new
connections to the database when a new thread is spawned.
2018-12-28 17:44:37 +10:00
4cc1f337f7
db.model: Fix table name in foreign key. 2018-12-26 14:13:27 +10:00
a2acb38703
traits: Add PAIR trait type. 2018-12-26 13:40:31 +10:00
42703cc433
traits: Implement common base class for all String traits. 2018-12-26 13:40:04 +10:00
d0efdc6bfe
db.model: Add trait instance pairs 2018-12-26 13:26:08 +10:00
b4761236d6
traits: Add logging detail 2018-12-26 13:09:00 +10:00
e9dc9c50fe
server: Debug log-in, add cache control headers. 2018-12-26 12:45:50 +10:00
5a8ce8063e
server: Move static files to /static. 2018-12-26 12:27:48 +10:00
f9ef58c627
traits.spamname: Use search not match.
`match` checks the start of a string, we want to consider the entire
string.
2018-12-22 16:56:08 +10:00
eb82f2de10
traits: Fix broken inheritance 2018-12-22 16:17:57 +10:00
d28518f568
traits: Add "About Me" link trait. 2018-12-22 16:15:34 +10:00
aee33ef637
traits: Add spam name trait 2018-12-22 16:14:39 +10:00
013993eac9
crawler: Fine tune regexes. 2018-12-22 15:46:46 +10:00
d9145b7f24
traits: Fix persist and discard 2018-12-22 13:23:01 +10:00
769983144f
traits.trait: Fix Query vs query typo. 2018-12-22 13:10:07 +10:00