Enhance strict typing and improve job initialization in FA and Inkbunny domains

- Refactored job classes in the FA domain to enforce strict typing with Sorbet, including the addition of type signatures in `FavsJob` and `Base` classes.
- Updated initialization methods to accept variable arguments and ensure proper type handling.
- Improved error handling in `ApiSearchPageProcessor` to gracefully manage null values for `last_file_update_datetime`.
- Added a new fixture for testing scenarios where `last_file_update_datetime` is null, enhancing test coverage.

These changes aim to improve type safety, maintainability, and robustness of the job processing logic.
This commit is contained in:
Dylan Knutson
2025-01-02 02:08:38 +00:00
parent 0a651bab9d
commit 8817d21e0f
6 changed files with 188 additions and 8 deletions

View File

@@ -0,0 +1,116 @@
{
"sid": "9B5BPQqTZ,Mj-nYbL2tuIPoO,b",
"results_count_all": "564",
"results_count_thispage": 100,
"pages_count": 1,
"page": 1,
"user_location": "",
"rid": "dc55754e57",
"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": "no"
},
{
"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": "16532"
},
{
"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": ""
},
{
"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": "2855990",
"hidden": "f",
"username": "Darkwitt",
"user_id": "16532",
"create_datetime": "2022-11-23 11:19:51.482781+00",
"create_datetime_usertime": "23 Nov 2022 12:19 CET",
"last_file_update_datetime": null,
"last_file_update_datetime_usertime": "01 Jan 1970 01:00 CET",
"file_name": null,
"title": "New Submission",
"deleted": "f",
"public": "t",
"mimetype": null,
"pagecount": "0",
"rating_id": "2",
"rating_name": "Adult",
"file_url_full": false,
"file_url_screen": false,
"file_url_preview": false,
"submission_type_id": "1",
"type_name": "Picture/Pinup",
"friends_only": "f",
"guest_block": "f",
"scraps": "f"
}
]
}