/
TODO.easy
34 lines (27 loc) · 1.58 KB
/
TODO.easy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Easy, small scale TODO tasks. When you do one of them, move them to the end of
the file below the 'DONE:' marker, and add a small comment if you found it
easy or not
(2) modify tools/create-ksx-index.pl to record the current timestamp
in a small file (plain text or JSON). Bonus points for actually
using the time that the database provides. Hint: SELECT NOW()
(3) (depends on (2)): modify tools/create-ksx-index.pl in the
following way: if the indexes and the file written in task (2)
already exist, don't delete the index, but add only records
where the 'created' field is younger than the timestamp record
in task (2).
(4) (depends on (3)) modify tools/create-ksx-index.pl so that it checks
bot the 'created' and 'modified' fields. If a row was modified
since the last run, but created before it, delete the old item
from the index (method delete_by_term in KinoSearch::Index::Indexer)
before adding the new one.
(5) Move a DB query to the backend.
All non-trivial database queries should be methods in the classes
in the Quelology::Model:: namespace, usually in resultsets.
Create a class Quelology::Model::ResultSet::AuthorWikiLinkCount
(you can take the boilerplate from other ResultSet classes).
Then take the query from the '/trivia/authors-by-wiki-languages'
callback in file web/quelology and turn it into a method called
top_authors in that new file. Call that method from web/quelology.
DONE:
(1) lib/Quelology/Config.pm uses JSON::XS to parse the config file.
Since we use Mojo anyway, rewrite it to use Mojo::JSON instead.