cd3c444f26
server: Actually commit calculated hash and link it to avatar.
2018-11-27 20:58:13 +10:00
2d28d6d0ff
server, hasher: Add avatar image hashing.
...
This uses one of a number of supported algorithms to hash a given
avatar, namely `phash`, `dhash`, `average_hash` or `whash`.
2018-11-26 21:31:44 +10:00
5590bdc523
server: Handle empty admin IDs case
2018-11-26 21:01:23 +10:00
72a96c6b6f
server: Add new log-in endpoint
...
This uses the earlier `Account` table to authorise users by checking
their password against a hash of it in the database. This is
implemented using `passlib` and uses the following hashes (in this
order): `argon2`, `scrypt` or `bcrypt`.
2018-11-26 07:55:40 +10:00
d860d0c293
server: Allow explicit defintion of user order.
2018-09-08 11:50:24 +10:00
f277f1f45c
server: Tweak handling of after_user_id/before_user_id
2018-09-08 11:45:39 +10:00
2cd4d06c31
server: Pick the first N users when using after_user_id.
2018-09-08 11:20:11 +10:00
43158c4a1e
server: Fix missed positional argument.
2018-09-07 23:53:09 +10:00
b7e81c56df
server: Expose IDs of words, word adjacencies and hostnames.
2018-09-04 20:48:58 +10:00
83b06e8fdb
server: Add more handlers
...
This allows us to present more data to the frontend.
2018-09-03 22:21:00 +10:00
4c897aa64e
server: Call logging functions via extdlog.
2018-08-04 12:20:43 +10:00
659fb43a88
server: Use audit for some messages
2018-08-04 12:17:53 +10:00
ddd30da1b2
server: Expose HAD creation time
2018-08-03 22:41:04 +10:00
958e9fb82f
server: Pass through API request limit interval.
2018-07-01 18:58:55 +10:00
e5ac25cbd8
server: Don't cast parameters
...
`argparse` should do that for us.
2018-07-01 14:42:04 +10:00
9e2f145cbc
server: Pass in crawler settings
2018-07-01 14:25:16 +10:00
d7147b2d8e
server: Expose user hostname scores.
2018-06-03 18:30:00 +10:00
a4d7a0ca7a
server: Tally up the hostnames linked to by users.
2018-06-03 18:00:56 +10:00
f55795675d
server: API to use own HTTP client instance, don't pass to crawler.
2018-06-02 16:52:20 +10:00
40ad79dd3d
server: Report back error 400 on failed OAuth callback.
2018-06-02 12:47:02 +10:00
738794f0d5
server, crawler: Add ability to make non-members admins
...
This is done by specifying the user's UID on the command line.
2018-06-02 11:02:07 +10:00
abf0820a9a
server: Set cache control on newcomers feed.
...
Otherwise the browser caches the response.
2018-05-02 21:46:05 +10:00
a4d5836016
server: Set User Agent on HTTP client.
2018-05-02 20:35:00 +10:00
6d554920fe
server: Expose inspection count and next inspection time.
2018-03-03 13:24:29 +10:00
55b9c71d88
server: Report whether inspection is pending
2018-03-03 13:04:17 +10:00
bf0060e2be
server: Remove user from DeferredUsers on classification.
2018-03-03 12:59:44 +10:00
9f2402a2c8
server: Use dedicated database connection for session.
2018-03-02 22:05:13 +10:00
349c597394
server: Wrap database calls in try-finally
...
Close database in finally block.
2018-03-02 22:00:03 +10:00
af58e9006c
server: Connect to and close off database in worker.
...
Don't pass connection across threads, as it seems to leave the link
hanging.
2018-03-02 21:42:25 +10:00
870e47500a
server: Use previously tokenised words.
...
Since we've pretty much dealt with all users that were not previously
tokenised; we can drop that bit of backward-compatible code that
tokenises on classification.
We should be able to just commit once too, which should speed things up.
2018-03-02 21:12:46 +10:00
0de910395d
server: Handle user without detail.
2018-03-02 19:42:50 +10:00
8646c09ee1
server: Make number of users returned configurable.
...
Limit to 10 by default.
2018-03-02 19:41:48 +10:00
748192875a
server: Wrap ClassifyHandler in semaphore.
...
This has the potential to deadlock if multiple instances run together,
so wrap it in a semaphore to reduce the probability of this.
2018-03-02 19:11:36 +10:00
fa6635ba9d
server: Generate JSON response in worker thread.
...
Passing back the User object is not a good idea as it becomes detached
from the session.
2018-03-02 19:06:40 +10:00
d3779e0509
server: Re-locate log message output.
2018-03-02 18:47:55 +10:00
6b69f93861
server: Pass through user_id to classify handler.
2018-03-02 18:46:43 +10:00
aa0334abbc
server: Add missed thread_count argument
2018-03-02 18:40:22 +10:00
89c737687a
server: Defer classifying to worker thread.
...
Updating the database scores can take a while, let's not block the main
thread.
2018-03-02 18:39:18 +10:00
374e441466
server: Add a worker pool
2018-03-02 18:34:07 +10:00
dd0fbd51e5
server: Fix user classify handler
2018-03-01 22:15:15 +10:00
d98ac5e85d
server: Use separate DB instance per request.
...
Otherwise, if a SQL error occurs, it trips up the whole server.
2018-03-01 22:07:50 +10:00
7d0d686418
server: Retry word adjacency addition.
2018-03-01 22:02:37 +10:00
47ac3dcd64
server: Commit word adjacencies on create.
2018-03-01 21:57:04 +10:00
04b997a8e8
server: Fix typo in ClassifyHandler
2018-03-01 21:51:47 +10:00
25c9375703
server: Use previously obtained tokens if possible.
2018-02-25 20:30:51 +10:00
2bcc8191bf
server: Drop user links and detail if legit.
...
If we mark a user as legitimate, drop the links and user detail
associated with the user account.
2018-02-13 08:19:49 +10:00
056e469e03
server: Handle null last_update in user detail.
2018-02-03 21:49:49 +10:00
75153d2d2d
server: Switch sort order of users.
...
Since we're no longer getting reliable user creation times, use the user
ID instead.
2018-02-03 14:43:33 +10:00
1c1dd25cca
server: Use dedicated database instance for crawler.
2018-02-03 12:23:49 +10:00
e8531a6731
server: Report user word usage and tokens.
2018-02-03 10:46:02 +10:00