Commit Graph

48 Commits

Author SHA1 Message Date
evazion
1c5786d20f posts: remove cropped thumbnails. 2021-12-16 15:58:29 -06:00
evazion
fd127cbaba rake: fix syntax error in danbooru:images:validate rake task. 2021-12-08 21:30:33 -06:00
evazion
08bcd51ac8 media assets: add rake task to validate thumbnails.
Update `bin/rails danbooru:images:validate` to work on media assets
instead of posts, and to check that all thumbnails exist.
2021-12-07 18:01:21 -06:00
evazion
082544ab03 StorageManager: remove Post-specific code.
Refactor StorageManager to remove all image URL generation code. Instead
the image URL generation code lives in MediaAsset.

Now StorageManager is only concerned with how to read and write files to
remote storage backends like S3 or SFTP, not with how image URLs should
be generated. This way the file storage code isn't tightly coupled to
posts, so it can be used to store any kind of file, not just images
belonging to posts.
2021-10-27 00:05:30 -05:00
evazion
52f3c22173 rake: clean up rake tasks.
* Make danbooru:images:validate task run in parallel.
* Remove task for regenerating thumbnails.
* Move all rake tasks into same file.
* Add usage instructions.
2021-09-22 05:36:22 -05:00
evazion
85d70561e5 rake: change docker build task to buildx. 2021-09-16 02:32:02 -05:00
evazion
e16aa7b1c5 Add script to backfill MediaMetadata. 2021-09-15 11:05:45 -05:00
evazion
d7cc844bd9 rake: add task for reindexing posts in iqdb. 2021-08-29 03:36:16 -05:00
evazion
0f36bbf8d3 iqdb: update API client to use new version of IQDB.
Replace the old IQDB API client with a new client for the new forked
version of IQDB at https://github.com/danbooru/iqdb.

Changes:

* The /iqdb_queries endpoint now returns `hash` and `signature` fields.
  The `signature` is the full decoded Haar signature, while the `hash`
  is a encoded version of the signature.
* The /iqdb_queries endpoint no longer returns `width` and `height`
  fields in the response (these were always 128x128).
* We no longer need the IQDBs frontend server, now we talk to the IQDB
  instance directly.
* We no longer send add/remove image commands to IQDB through AWS SQS,
  now we send them to IQDB directly. They are sent in a delayed job so
  that if IQDB is down, uploading images is still possible, the add
  image commands will just get queued up.
* Fix a bug where regenerating an image's thumbnails didn't regenerate
  IQDB, because IQDB silently ignored add image commands when the image
  already existed in the database.
2021-06-16 05:36:24 -05:00
evazion
f65f24be0b docker: add cron service to compose file. 2021-05-25 01:16:59 -05:00
evazion
d825bb144b docker: add rake task for building Docker image.
Add a Rake task for building a Docker image. Usage:

* bin/rails danbooru:docker:build
* sudo docker run --rm -it danbooru
2021-05-02 17:42:11 -05:00
evazion
c9ca5c0598 rake: fix images:manifest failing on file permission errors.
Fix images:manifest failing with an exception when a file can't be
opened because we don't have permission to access the file.
2021-03-20 16:15:16 -05:00
evazion
048171fe29 rake: fix images:manifest task to handle corrupted files. 2021-03-20 05:30:06 -05:00
evazion
6879fe73db rake: add task for checking image md5s.
Add a rake task for checking the md5s and size/width/height of all
uploaded files. Generates a JSON manifest file.

Usage: bin/rake images:manifest
2021-03-20 02:46:28 -05:00
evazion
5fc98eb35f rake: add image preview/sample regeneration script. 2020-05-23 23:51:23 -05:00
evazion
79aff89573 maintenance: prune approvers monthly instead of weekly.
* Move approver pruning from a weekly task to a monthly task.
* Move weekly maintenance tasks from Wednesdays at 1:30am to Sundays at
  midnight (UTC).
2020-01-13 13:23:22 -06:00
evazion
7da85a4eb7 rake: add images:backup rake task. 2019-12-30 23:00:53 -06:00
evazion
fe0bb1e602 rake: remove unused image tasks. 2019-12-30 23:00:53 -06:00
evazion
309821bf73 rubocop: fix various style issues. 2019-12-22 21:23:37 -06:00
evazion
316690f393 storage manager: remove S3 backend.
Remove in favor of the rclone S3 backend.
2019-12-13 02:14:14 -06:00
evazion
5f1226ca92 Rename maintenance.rb -> danbooru_maintenance.rb.
Fixes random test failures caused by ambiguous constant lookup issues
(the `Maintenance` module name was used in multiple conflicting places).
2019-08-15 00:36:25 -05:00
evazion
6e54c37b04 maintenance: add rake tasks for maintenance jobs. 2018-10-09 20:11:24 -05:00
Albert Yi
762dc3da24 Refactor sources 2018-08-24 12:10:51 -07:00
Albert Yi
c9fe91c74b fix base dir for image distribute rake task 2018-04-12 10:48:53 -07:00
Albert Yi
03e2a2ca3b add rake task for distributing images using storage managers 2018-04-12 10:40:24 -07:00
evazion
4b5129d447 lib/tasks/images.rake: fix bad ref to danbooru_image_resizer.
Fixup for efeaad25.
2017-12-18 18:08:41 -06:00
r888888888
75f87bcc8e potential fix for #3290 2017-09-13 13:00:20 -07:00
r888888888
b9b38ca25e tweak css for responsive 2017-09-06 13:32:32 -07:00
r888888888
6c9d5e4f9a remove advertisement code 2017-02-21 13:35:22 -08:00
r888888888
651dad473d fixes #2884: Comment unvoting is broken 2017-02-14 10:35:27 -08:00
r888888888
e5cd79eddd remove preview/large file upload rake tasks 2017-02-08 16:53:43 -08:00
r888888888
f0a8598ba2 update aws gem, stub in rake tasks for s3 2017-02-08 15:06:54 -08:00
r888888888
b57b54113f add cdn hosted flag to posts 2017-02-07 17:26:16 -08:00
r888888888
2ade577639 add rake task for redownloading pixiv posts 2016-04-28 11:46:26 -07:00
albert
ab9c0d13d7 add rake task for finding missing ads 2013-02-21 18:26:53 -05:00
albert
2b429c928c smarter large file regen 2013-02-21 18:25:21 -05:00
albert
8fb20c6b3a fixed nico seiga sources 2013-02-19 23:09:07 -05:00
albert
9e3df40b39 add rake task for regenerating images 2013-02-19 22:13:07 -05:00
albert
50c99bab03 rake task for downloading images from main danbooru 2012-09-20 19:21:40 -04:00
albert
7269ec0076 removed small image support 2012-03-13 18:28:32 -04:00
albert
3375cf7437 improve base thumbnail quality 2012-02-09 15:29:36 -05:00
albert
8e3a6c5923 style fixes 2011-12-06 18:58:26 -05:00
albert
ca6fef9195 fixed to image rake script 2011-11-02 18:11:32 -04:00
albert
32c1d89485 fix image rake script 2011-11-02 18:01:54 -04:00
albert
b06857f8bd new rake task for generating resized images 2011-11-01 17:22:58 -04:00
albert
469ae14805 fixed tests, implemented sql based partitioning for favorites 2011-07-16 20:16:34 -04:00
albert
e6888ea1dd fixed tag and pending post tests, added category multiget helper to tag, post/unapproval/post version in progress still 2010-02-10 16:12:30 -05:00
Albert Yi
9bb07046cd initial 2010-02-04 15:08:49 -05:00