Commit graph

79 commits

Author SHA1 Message Date
Adeodato Simó c066d11eb1
Bugfix: default missing date components to 1, not today's
Fixes: #2660.
2023-10-15 19:49:00 -03:00
Adeodato Simó 8f0f3e6ace
ImportItem: preserve parsed timezones in date_started, date_read
This is a follow-up to b564e514f ("Handle parsed dates that already
have a timezone on import"), which was applied to `date_added` only.

(Appart from consistency, this will allow to apply future parsing fixes
more easily.)
2023-10-15 19:48:02 -03:00
Joeri de Ruiter 0686926048 Type annotations for bookwyrm.importers 2023-08-21 16:58:16 +02:00
Wesley Aptekar-Cassels 3e78e398c0 Switch from priority queues to function-based queues
Fixes: #2907
2023-07-20 12:25:30 -04:00
Mouse Reeve ac48457748
Merge pull request #2770 from bookwyrm-social/import-rating-parser
Catch value errors when parsing imported ratings
2023-04-25 16:21:25 -07:00
Wesley Aptekar-Cassels 1048638e30 Stop ignoring task results
This is essentially a revert of 9cbff312a. The commit was at the advice
of the Celery docs for optimization, but I've since decided that the
downsides in terms of making things harder to debug (it makes Flower
nearly useless, for instance) are bigger than the upsides in performance
gain (which seem extremely small in practice, given how long our tasks
take, and the number of tasks we have).
2023-04-07 21:51:44 -04:00
Mouse Reeve c77436fc12 Catch value errors when parsing imported ratings 2023-03-29 20:15:09 -07:00
Wesley Aptekar-Cassels 9cbff312a5 Ignore Celery task results
Since we don't use the results of our Celery tasks (all of them return
None implicitly), it's prudent to set the ignore_result flag, for a
potential performance improvement. See the Celery docs for details [1].

We could do this with the global CELERY_IGNORE_RESULT setting, but it
offers more flexibility if we want to use task results in the future to
set it on a per-task basis.

[1]: https://docs.celeryq.dev/en/stable/userguide/tasks.html#ignore-results-you-don-t-want
2023-03-08 02:12:13 -05:00
Mouse Reeve d86e6a6949
Merge pull request #2516 from bookwyrm-social/import-queue
Create a separate celery queue for imports
2022-12-16 14:58:35 -08:00
Mouse Reeve 3972d1cc7b Don't mark imports as active until their job task runs 2022-12-16 14:41:35 -08:00
Mouse Reeve 427d0c4fc8 Create a separate celery queue for imports 2022-12-16 14:20:50 -08:00
André Jaenisch 530d7de309
Use variable instead of string
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-11-13 16:59:05 +01:00
Mouse Reeve 493fd68af4 Merge branch 'main' into cancel-imports 2022-11-07 09:06:13 -08:00
Mouse Reeve 76fb4c9280 Revoke tasks 2022-11-05 15:41:06 -07:00
Mouse Reeve 7a36de5ebe Start and stop jobs from the model 2022-11-05 14:35:27 -07:00
Mouse Reeve 97513a43d6 Set import job status when job starts and finishes 2022-11-05 13:47:06 -07:00
Mouse Reeve 9cfcad20e0 Avoid divide by zero error 2022-11-05 13:33:57 -07:00
Mouse Reeve 24e5ea3295 Check if import is stopped and create import status field 2022-11-05 13:32:23 -07:00
Mouse Reeve 3c2f2c10bf Show recent imports in a table 2022-11-05 13:12:23 -07:00
Mouse Reeve 40e9428b49 Adds more fields to import admin table and ticks version 2022-11-03 11:30:43 -07:00
Mouse Reeve a8424f61f2 Mark imports as complete
This will let the user debug the import, and should only be used when
the import is in a bad state (marked as incomplete but with no pending
tasks)
2022-11-01 19:26:23 -07:00
Mouse Reeve 6eab1fdd6d Adds import admin view 2022-11-01 19:05:51 -07:00
André Jaenisch d837146b66
Make black happy
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-23 20:59:28 +02:00
André Jaenisch b564e514fd
Handle parsed dates that already have a timezone on import.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-05-23 20:52:57 +02:00
Mouse Reeve 8b2335c52c Build-in translations to privacy choices dropdwon 2022-01-12 15:26:13 -08:00
Mouse Reeve bee3c86223 Lookup by openlibrary key 2021-12-14 12:49:00 -08:00
Mouse Reeve 79af354dfd Don't produce error is author is unset in import 2021-12-14 11:27:13 -08:00
Mouse Reeve 9f6796bbf5 Safer request for normalized data 2021-11-14 10:29:12 -08:00
Mouse Reeve 31f3351854 Fixes bug comparing dates to nonetype 2021-11-14 10:22:26 -08:00
Mouse Reeve 8cede05d32 Retry hanging items 2021-11-14 10:20:14 -08:00
Mouse Reeve f92863ad3e Notify when import completes 2021-11-14 09:56:23 -08:00
Mouse Reeve 47b98ad0d9 Track completed items on job 2021-11-14 09:04:12 -08:00
Mouse Reeve bdc3f6828b Python formatting 2021-11-14 07:11:48 -08:00
Mouse Reeve c614f638fd Merge branch 'import-field-names' of github.com:bookwyrm-social/bookwyrm into import-field-names 2021-11-14 07:06:48 -08:00
Mouse Reeve fb91c33682 Fixes isbn assignment for goodreads 2021-11-13 12:24:16 -08:00
Mouse Reeve 1e46de4c9d Associate imported review with import item 2021-11-13 11:44:05 -08:00
Mouse Reeve 40fff02eec Approve or delete import guesses 2021-11-12 17:10:47 -08:00
Mouse Reeve e09c02017c Fixes title/author search handling 2021-11-12 14:46:39 -08:00
Mouse Reeve 80c1954aa3 Fixes first_search_result behavior 2021-11-12 13:48:31 -08:00
Mouse Reeve 1e8269b6c9 Refactors import status view 2021-11-12 13:10:52 -08:00
Mouse Reeve 4ccd9fc633 Use generalized mappings to handle import 2021-11-10 16:49:54 -08:00
Mouse Reeve 0736c7e160 Uses general names for fields in parsed csvs 2021-11-10 11:10:09 -08:00
Mouse Reeve b1ff46a562 Remove unused import 2021-09-22 10:42:42 -07:00
Mouse Reeve a4ac25bfae Move notifications to signals 2021-09-22 09:24:39 -07:00
Mouse Reeve acfb1bb376 Updating string format synatx part 2 2021-09-18 11:32:00 -07:00
Mouse Reeve b36f7d7b69 Merge branch 'main' into csv-import-failures 2021-09-11 07:19:40 -07:00
Mouse Reeve e0f5f13a5a Fixes guessing read dates from goodreads csv 2021-09-07 18:09:43 -07:00
Mouse Reeve 1b4db49035 Fixing bug preventing csv imports to match via title/author 2021-08-10 14:30:28 -07:00
Mouse Reeve ef1896da18 Return confidence rating 2021-08-10 14:02:22 -07:00
Mouse Reeve fa396d4bc8 Save best-guess search results on import 2021-08-10 13:54:52 -07:00