Enhance Inkbunny job processing and database schema
- Added support for pool-specific API searches in `ApiSearchPageProcessor` by introducing `pool_id` as a parameter. - Created a new `UpdatePoolJob` class to handle deep updates for pools, including enqueuing jobs for posts needing updates. - Updated `UpdatePostsJob` to manage missing posts and pools more effectively, ensuring proper job enqueuing. - Modified the `Domain::Inkbunny::Pool` model to include a reference to `deep_update_log_entry` for tracking updates. - Updated database schema to add `deep_update_log_entry_id` to the `domain_inkbunny_pools` table. - Added tests for the new job functionality and ensured correct processing of API responses. These changes improve the maintainability and robustness of the Inkbunny job processing system.
This commit is contained in:
83
test/fixtures/files/domain/inkbunny/job/api_search_pool_83746_page_1.json
vendored
Normal file
83
test/fixtures/files/domain/inkbunny/job/api_search_pool_83746_page_1.json
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"sid": "9B5BPQqTZ,Mj-nYbL2tuIPoO,b",
|
||||
"results_count_all": "67",
|
||||
"results_count_thispage": 2,
|
||||
"pages_count": 2,
|
||||
"page": 1,
|
||||
"user_location": "",
|
||||
"rid": "2a21f7d4bc",
|
||||
"rid_ttl": "15 minutes",
|
||||
"search_params": [],
|
||||
"submissions": [
|
||||
{
|
||||
"submission_id": "3334290",
|
||||
"hidden": "f",
|
||||
"username": "ThendyArt",
|
||||
"user_id": "941565",
|
||||
"create_datetime": "2024-05-28 00:57:36.597545+00",
|
||||
"create_datetime_usertime": "28 May 2024 02:57 CEST",
|
||||
"last_file_update_datetime": "2024-05-28 00:55:24.811748+00",
|
||||
"last_file_update_datetime_usertime": "28 May 2024 02:55 CEST",
|
||||
"thumbnail_url_huge_noncustom": "https:\/\/tx.ib.metapix.net\/files\/preview\/5052\/5052995_ThendyArt_img_8512.jpg",
|
||||
"thumbnail_url_large_noncustom": "https:\/\/tx.ib.metapix.net\/thumbnails\/large\/5052\/5052995_ThendyArt_img_8512_noncustom.jpg",
|
||||
"thumbnail_url_medium_noncustom": "https:\/\/tx.ib.metapix.net\/thumbnails\/medium\/5052\/5052995_ThendyArt_img_8512_noncustom.jpg",
|
||||
"thumb_medium_noncustom_x": "93",
|
||||
"thumb_medium_noncustom_y": "120",
|
||||
"thumb_large_noncustom_x": "155",
|
||||
"thumb_large_noncustom_y": "200",
|
||||
"thumb_huge_noncustom_x": "232",
|
||||
"thumb_huge_noncustom_y": "300",
|
||||
"file_name": "5052995_ThendyArt_img_8512.jpg",
|
||||
"title": "Phantom Touch: Follow-Up",
|
||||
"deleted": "f",
|
||||
"public": "t",
|
||||
"mimetype": "image\/jpeg",
|
||||
"pagecount": "1",
|
||||
"rating_id": "0",
|
||||
"rating_name": "General",
|
||||
"file_url_full": "https:\/\/tx.ib.metapix.net\/files\/full\/5052\/5052995_ThendyArt_img_8512.jpg",
|
||||
"file_url_screen": "https:\/\/tx.ib.metapix.net\/files\/screen\/5052\/5052995_ThendyArt_img_8512.jpg",
|
||||
"file_url_preview": "https:\/\/tx.ib.metapix.net\/files\/preview\/5052\/5052995_ThendyArt_img_8512.jpg",
|
||||
"submission_type_id": "1",
|
||||
"type_name": "Picture\/Pinup",
|
||||
"friends_only": "f",
|
||||
"guest_block": "f",
|
||||
"scraps": "f"
|
||||
},
|
||||
{
|
||||
"submission_id": "3333345",
|
||||
"hidden": "f",
|
||||
"username": "ThendyArt",
|
||||
"user_id": "941565",
|
||||
"create_datetime": "2024-05-26 23:31:29.449436+00",
|
||||
"create_datetime_usertime": "27 May 2024 01:31 CEST",
|
||||
"last_file_update_datetime": "2024-05-26 23:30:55.983099+00",
|
||||
"last_file_update_datetime_usertime": "27 May 2024 01:30 CEST",
|
||||
"thumbnail_url_huge_noncustom": "https:\/\/tx.ib.metapix.net\/files\/preview\/5051\/5051517_ThendyArt_untitled_artwork.jpg",
|
||||
"thumbnail_url_large_noncustom": "https:\/\/tx.ib.metapix.net\/thumbnails\/large\/5051\/5051517_ThendyArt_untitled_artwork_noncustom.jpg",
|
||||
"thumbnail_url_medium_noncustom": "https:\/\/tx.ib.metapix.net\/thumbnails\/medium\/5051\/5051517_ThendyArt_untitled_artwork_noncustom.jpg",
|
||||
"thumb_medium_noncustom_x": "93",
|
||||
"thumb_medium_noncustom_y": "120",
|
||||
"thumb_large_noncustom_x": "155",
|
||||
"thumb_large_noncustom_y": "200",
|
||||
"thumb_huge_noncustom_x": "232",
|
||||
"thumb_huge_noncustom_y": "300",
|
||||
"file_name": "5051517_ThendyArt_untitled_artwork.jpg",
|
||||
"title": "Phantom Touch - The End!!",
|
||||
"deleted": "f",
|
||||
"public": "t",
|
||||
"mimetype": "image\/jpeg",
|
||||
"pagecount": "1",
|
||||
"rating_id": "2",
|
||||
"rating_name": "Adult",
|
||||
"file_url_full": "https:\/\/tx.ib.metapix.net\/files\/full\/5051\/5051517_ThendyArt_untitled_artwork.jpg",
|
||||
"file_url_screen": "https:\/\/tx.ib.metapix.net\/files\/screen\/5051\/5051517_ThendyArt_untitled_artwork.jpg",
|
||||
"file_url_preview": "https:\/\/tx.ib.metapix.net\/files\/preview\/5051\/5051517_ThendyArt_untitled_artwork.jpg",
|
||||
"submission_type_id": "1",
|
||||
"type_name": "Picture\/Pinup",
|
||||
"friends_only": "f",
|
||||
"guest_block": "f",
|
||||
"scraps": "f"
|
||||
}
|
||||
]
|
||||
}
|
||||
160
test/fixtures/files/domain/inkbunny/job/api_search_pool_83746_page_2.json
vendored
Normal file
160
test/fixtures/files/domain/inkbunny/job/api_search_pool_83746_page_2.json
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
{
|
||||
"sid": "9B5BPQqTZ,Mj-nYbL2tuIPoO,b",
|
||||
"results_count_all": "67",
|
||||
"results_count_thispage": 2,
|
||||
"pages_count": 2,
|
||||
"page": 2,
|
||||
"user_location": "",
|
||||
"rid": "2a21f7d4bc",
|
||||
"rid_ttl": "15 minutes",
|
||||
"search_params": [
|
||||
{
|
||||
"param_name": "field_join_type",
|
||||
"param_value": "or"
|
||||
},
|
||||
{
|
||||
"param_name": "text",
|
||||
"param_value": ""
|
||||
},
|
||||
{
|
||||
"param_name": "string_join_type",
|
||||
"param_value": "and"
|
||||
},
|
||||
{
|
||||
"param_name": "keywords",
|
||||
"param_value": "yes"
|
||||
},
|
||||
{
|
||||
"param_name": "keyword_id",
|
||||
"param_value": false
|
||||
},
|
||||
{
|
||||
"param_name": "title",
|
||||
"param_value": "no"
|
||||
},
|
||||
{
|
||||
"param_name": "description",
|
||||
"param_value": "no"
|
||||
},
|
||||
{
|
||||
"param_name": "md5",
|
||||
"param_value": "no"
|
||||
},
|
||||
{
|
||||
"param_name": "username",
|
||||
"param_value": ""
|
||||
},
|
||||
{
|
||||
"param_name": "user_id",
|
||||
"param_value": ""
|
||||
},
|
||||
{
|
||||
"param_name": "favs_user_id",
|
||||
"param_value": ""
|
||||
},
|
||||
{
|
||||
"param_name": "unread_submissions",
|
||||
"param_value": "no"
|
||||
},
|
||||
{
|
||||
"param_name": "type",
|
||||
"param_value": ""
|
||||
},
|
||||
{
|
||||
"param_name": "pool_id",
|
||||
"param_value": "83746"
|
||||
},
|
||||
{
|
||||
"param_name": "orderby",
|
||||
"param_value": "create_datetime"
|
||||
},
|
||||
{
|
||||
"param_name": "dayslimit",
|
||||
"param_value": ""
|
||||
},
|
||||
{
|
||||
"param_name": "random",
|
||||
"param_value": "no"
|
||||
},
|
||||
{
|
||||
"param_name": "scraps",
|
||||
"param_value": "both"
|
||||
},
|
||||
{
|
||||
"param_name": "count_limit",
|
||||
"param_value": 18000
|
||||
}
|
||||
],
|
||||
"submissions": [
|
||||
{
|
||||
"submission_id": "3333338",
|
||||
"hidden": "f",
|
||||
"username": "ThendyArt",
|
||||
"user_id": "941565",
|
||||
"create_datetime": "2024-05-26 23:21:31.359589+00",
|
||||
"create_datetime_usertime": "27 May 2024 01:21 CEST",
|
||||
"last_file_update_datetime": "2024-05-26 23:20:26.520089+00",
|
||||
"last_file_update_datetime_usertime": "27 May 2024 01:20 CEST",
|
||||
"thumbnail_url_huge_noncustom": "https://tx.ib.metapix.net/files/preview/5051/5051507_ThendyArt_untitled_artwork_1.jpg",
|
||||
"thumbnail_url_large_noncustom": "https://tx.ib.metapix.net/thumbnails/large/5051/5051507_ThendyArt_untitled_artwork_1_noncustom.jpg",
|
||||
"thumbnail_url_medium_noncustom": "https://tx.ib.metapix.net/thumbnails/medium/5051/5051507_ThendyArt_untitled_artwork_1_noncustom.jpg",
|
||||
"thumb_medium_noncustom_x": "93",
|
||||
"thumb_medium_noncustom_y": "120",
|
||||
"thumb_large_noncustom_x": "155",
|
||||
"thumb_large_noncustom_y": "200",
|
||||
"thumb_huge_noncustom_x": "232",
|
||||
"thumb_huge_noncustom_y": "300",
|
||||
"file_name": "5051507_ThendyArt_untitled_artwork_1.jpg",
|
||||
"title": "Phantom Touch - Page 64",
|
||||
"deleted": "f",
|
||||
"public": "t",
|
||||
"mimetype": "image/jpeg",
|
||||
"pagecount": "1",
|
||||
"rating_id": "2",
|
||||
"rating_name": "Adult",
|
||||
"file_url_full": "https://tx.ib.metapix.net/files/full/5051/5051507_ThendyArt_untitled_artwork_1.jpg",
|
||||
"file_url_screen": "https://tx.ib.metapix.net/files/screen/5051/5051507_ThendyArt_untitled_artwork_1.jpg",
|
||||
"file_url_preview": "https://tx.ib.metapix.net/files/preview/5051/5051507_ThendyArt_untitled_artwork_1.jpg",
|
||||
"submission_type_id": "1",
|
||||
"type_name": "Picture/Pinup",
|
||||
"friends_only": "f",
|
||||
"guest_block": "f",
|
||||
"scraps": "f"
|
||||
},
|
||||
{
|
||||
"submission_id": "3327400",
|
||||
"hidden": "f",
|
||||
"username": "ThendyArt",
|
||||
"user_id": "941565",
|
||||
"create_datetime": "2024-05-19 22:19:26.620567+00",
|
||||
"create_datetime_usertime": "20 May 2024 00:19 CEST",
|
||||
"last_file_update_datetime": "2024-05-19 15:52:53.158883+00",
|
||||
"last_file_update_datetime_usertime": "19 May 2024 17:52 CEST",
|
||||
"thumbnail_url_huge_noncustom": "https://tx.ib.metapix.net/files/preview/5041/5041890_ThendyArt_img_8437.jpg",
|
||||
"thumbnail_url_large_noncustom": "https://tx.ib.metapix.net/thumbnails/large/5041/5041890_ThendyArt_img_8437_noncustom.jpg",
|
||||
"thumbnail_url_medium_noncustom": "https://tx.ib.metapix.net/thumbnails/medium/5041/5041890_ThendyArt_img_8437_noncustom.jpg",
|
||||
"thumb_medium_noncustom_x": "93",
|
||||
"thumb_medium_noncustom_y": "120",
|
||||
"thumb_large_noncustom_x": "155",
|
||||
"thumb_large_noncustom_y": "200",
|
||||
"thumb_huge_noncustom_x": "232",
|
||||
"thumb_huge_noncustom_y": "300",
|
||||
"file_name": "5041890_ThendyArt_img_8437.jpg",
|
||||
"title": "Phantom Touch - Page 63",
|
||||
"deleted": "f",
|
||||
"public": "t",
|
||||
"mimetype": "image/jpeg",
|
||||
"pagecount": "1",
|
||||
"rating_id": "2",
|
||||
"rating_name": "Adult",
|
||||
"file_url_full": "https://tx.ib.metapix.net/files/full/5041/5041890_ThendyArt_img_8437.jpg",
|
||||
"file_url_screen": "https://tx.ib.metapix.net/files/screen/5041/5041890_ThendyArt_img_8437.jpg",
|
||||
"file_url_preview": "https://tx.ib.metapix.net/files/preview/5041/5041890_ThendyArt_img_8437.jpg",
|
||||
"submission_type_id": "1",
|
||||
"type_name": "Picture/Pinup",
|
||||
"friends_only": "f",
|
||||
"guest_block": "f",
|
||||
"scraps": "f"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user