mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-13 18:24:28 -05:00
Compare commits
94
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d90474e32d | ||
|
|
76db576c84 | ||
|
|
a87e19b402 | ||
|
|
3a3e85abd0 | ||
|
|
4def6ebd47 | ||
|
|
1215df5844 | ||
|
|
362afd9d6c | ||
|
|
e0180712f7 | ||
|
|
d81bd219a2 | ||
|
|
4e6f25db83 | ||
|
|
adbf268985 | ||
|
|
80aff2bfff | ||
|
|
6f69a2715a | ||
|
|
5a18c51c11 | ||
|
|
cb98541c54 | ||
|
|
8782c6808c | ||
|
|
032705ac45 | ||
|
|
4c8ad1be04 | ||
|
|
203f4e5998 | ||
|
|
84b7bae839 | ||
|
|
317d56dbd0 | ||
|
|
fc83fcd490 | ||
|
|
1ac50b19b1 | ||
|
|
a56166c6a1 | ||
|
|
f458a26f48 | ||
|
|
1c79e6a062 | ||
|
|
f95c0b355f | ||
|
|
af38e923c7 | ||
|
|
8a6dcb1868 | ||
|
|
e07e0ab349 | ||
|
|
dbd431090f | ||
|
|
ee8596488c | ||
|
|
311252d953 | ||
|
|
dfbd3001f1 | ||
|
|
6e546894b2 | ||
|
|
4f9e23250d | ||
|
|
a5f967d6d5 | ||
|
|
7a17d1f20b | ||
|
|
31733b2063 | ||
|
|
c55ad1f2b3 | ||
|
|
d04458f000 | ||
|
|
cd848319eb | ||
|
|
6a1f4dc3bc | ||
|
|
826d710979 | ||
|
|
a9ec812e82 | ||
|
|
3aca9b9090 | ||
|
|
c0db177d4e | ||
|
|
2cb19357ab | ||
|
|
04a19ec4e3 | ||
|
|
f6f769476f | ||
|
|
b53e93773d | ||
|
|
38d174df83 | ||
|
|
1ddd3e75dc | ||
|
|
c60d8b6115 | ||
|
|
56e6d61a8d | ||
|
|
65b14a6486 | ||
|
|
eadb0eded0 | ||
|
|
eb68ab54c4 | ||
|
|
e947e118e3 | ||
|
|
8cc2e334b9 | ||
|
|
b680dbc895 | ||
|
|
68b1f9851c | ||
|
|
6c62851ab4 | ||
|
|
0d3e2e87bc | ||
|
|
6f62958c12 | ||
|
|
a6f96e019a | ||
|
|
61a84134d4 | ||
|
|
43abb4f4b1 | ||
|
|
1fc62e37b6 | ||
|
|
1455138351 | ||
|
|
aad1dbfbdb | ||
|
|
af326ad6c9 | ||
|
|
678cd391f6 | ||
|
|
2548ab880a | ||
|
|
32d44d7070 | ||
|
|
0f7853314d | ||
|
|
bc48f9c129 | ||
|
|
f12b94752f | ||
|
|
64b1dfb5ec | ||
|
|
9467cc2fe0 | ||
|
|
489aabda3d | ||
|
|
93e413dd88 | ||
|
|
8820e82971 | ||
|
|
9c18e6d1ca | ||
|
|
48949ce4b7 | ||
|
|
cdcb083369 | ||
|
|
858c93e4c3 | ||
|
|
1e1d8ab6ca | ||
|
|
56bffa9297 | ||
|
|
3f1125f59c | ||
|
|
639ace9fd4 | ||
|
|
07e3eed1c7 | ||
|
|
ae7b910671 | ||
|
|
d2fd811e41 |
+50
-39
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nSELECT\n m.token as `token: tokens::tokens::media_files::MediaFileToken`,\n\n m.media_class as `media_class: enums::by_table::media_files::media_file_class::MediaFileClass`,\n m.media_type as `media_type: enums::by_table::media_files::media_file_type::MediaFileType`,\n\n m.maybe_engine_category as `maybe_engine_category: enums::by_table::media_files::media_file_engine_category::MediaFileEngineCategory`,\n m.maybe_animation_type as `maybe_animation_type: enums::by_table::media_files::media_file_animation_type::MediaFileAnimationType`,\n\n m.maybe_media_subtype as `maybe_media_subtype: enums::by_table::media_files::media_file_subtype::MediaFileSubtype`,\n\n users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n users.username as maybe_creator_username,\n users.display_name as maybe_creator_display_name,\n users.email_gravatar_hash as maybe_creator_gravatar_hash,\n\n m.maybe_creator_anonymous_visitor_token as `maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken`,\n\n m.maybe_batch_token as `maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken`,\n\n m.maybe_style_transfer_source_media_file_token as `maybe_style_transfer_source_media_file_token: tokens::tokens::media_files::MediaFileToken`,\n m.maybe_scene_source_media_file_token as `maybe_scene_source_media_file_token: tokens::tokens::media_files::MediaFileToken`,\n\n m.maybe_title,\n m.maybe_text_transcript,\n\n m.maybe_origin_filename,\n\n m.maybe_duration_millis,\n\n m.maybe_prompt_token as `maybe_prompt_token: tokens::tokens::prompts::PromptToken`,\n prompts.maybe_other_args as maybe_other_prompt_args,\n\n media_file_cover_image.public_bucket_directory_hash as maybe_file_cover_image_public_bucket_hash,\n media_file_cover_image.maybe_public_bucket_prefix as maybe_file_cover_image_public_bucket_prefix,\n media_file_cover_image.maybe_public_bucket_extension as maybe_file_cover_image_public_bucket_extension,\n\n m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n model_weights.token as `maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken`,\n model_weights.title as maybe_model_weights_title,\n model_weights.weights_type as `maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n model_weights.weights_category as `maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n model_weight_cover_image.public_bucket_directory_hash as maybe_model_cover_image_public_bucket_hash,\n model_weight_cover_image.maybe_public_bucket_prefix as maybe_model_cover_image_public_bucket_prefix,\n model_weight_cover_image.maybe_public_bucket_extension as maybe_model_cover_image_public_bucket_extension,\n\n model_weight_creator.token as `maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken`,\n model_weight_creator.username as maybe_model_weight_creator_username,\n model_weight_creator.display_name as maybe_model_weight_creator_display_name,\n model_weight_creator.email_gravatar_hash as maybe_model_weight_creator_gravatar_hash,\n\n m.public_bucket_directory_hash,\n m.maybe_public_bucket_prefix,\n m.maybe_public_bucket_extension,\n\n entity_stats.ratings_positive_count as maybe_ratings_positive_count,\n entity_stats.ratings_negative_count as maybe_ratings_negative_count,\n entity_stats.bookmark_count as maybe_bookmark_count,\n\n featured_items.entity_token IS NOT NULL AS is_featured,\n\n m.created_at,\n m.updated_at\n\nFROM media_files AS m\nLEFT OUTER JOIN users\n ON m.maybe_creator_user_token = users.token\nLEFT OUTER JOIN model_weights\n ON m.maybe_origin_model_token = model_weights.token\nLEFT OUTER JOIN media_files as media_file_cover_image\n ON media_file_cover_image.token = m.maybe_cover_image_media_file_token\nLEFT OUTER JOIN media_files as model_weight_cover_image\n ON model_weight_cover_image.token = model_weights.maybe_cover_image_media_file_token\nLEFT OUTER JOIN users as model_weight_creator\n ON model_weight_creator.token = model_weights.creator_user_token\nLEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"media_file\"\n AND entity_stats.entity_token = m.token\nLEFT OUTER JOIN prompts\n ON prompts.token = m.maybe_prompt_token\nLEFT OUTER JOIN featured_items\n ON featured_items.entity_type = 'media_file'\n AND featured_items.entity_token = m.token\n AND featured_items.deleted_at IS NULL\nWHERE\n m.token = ?\n ",
|
||||
"query": "\nSELECT\n m.token as `token: tokens::tokens::media_files::MediaFileToken`,\n\n m.media_class as `media_class: enums::by_table::media_files::media_file_class::MediaFileClass`,\n m.media_type as `media_type: enums::by_table::media_files::media_file_type::MediaFileType`,\n\n m.maybe_engine_category as `maybe_engine_category: enums::by_table::media_files::media_file_engine_category::MediaFileEngineCategory`,\n m.maybe_animation_type as `maybe_animation_type: enums::by_table::media_files::media_file_animation_type::MediaFileAnimationType`,\n\n m.maybe_media_subtype as `maybe_media_subtype: enums::by_table::media_files::media_file_subtype::MediaFileSubtype`,\n\n m.maybe_mime_type,\n\n users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n users.username as maybe_creator_username,\n users.display_name as maybe_creator_display_name,\n users.email_gravatar_hash as maybe_creator_gravatar_hash,\n\n m.maybe_creator_anonymous_visitor_token as `maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken`,\n\n m.maybe_batch_token as `maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken`,\n\n m.maybe_style_transfer_source_media_file_token as `maybe_style_transfer_source_media_file_token: tokens::tokens::media_files::MediaFileToken`,\n m.maybe_scene_source_media_file_token as `maybe_scene_source_media_file_token: tokens::tokens::media_files::MediaFileToken`,\n\n\n m.maybe_title,\n m.maybe_text_transcript,\n\n m.maybe_origin_filename,\n\n m.maybe_duration_millis,\n\n m.maybe_prompt_token as `maybe_prompt_token: tokens::tokens::prompts::PromptToken`,\n prompts.maybe_other_args as maybe_other_prompt_args,\n\n media_file_cover_image.public_bucket_directory_hash as maybe_file_cover_image_public_bucket_hash,\n media_file_cover_image.maybe_public_bucket_prefix as maybe_file_cover_image_public_bucket_prefix,\n media_file_cover_image.maybe_public_bucket_extension as maybe_file_cover_image_public_bucket_extension,\n\n m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n model_weights.token as `maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken`,\n model_weights.title as maybe_model_weights_title,\n model_weights.weights_type as `maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n model_weights.weights_category as `maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n model_weight_cover_image.public_bucket_directory_hash as maybe_model_cover_image_public_bucket_hash,\n model_weight_cover_image.maybe_public_bucket_prefix as maybe_model_cover_image_public_bucket_prefix,\n model_weight_cover_image.maybe_public_bucket_extension as maybe_model_cover_image_public_bucket_extension,\n\n model_weight_creator.token as `maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken`,\n model_weight_creator.username as maybe_model_weight_creator_username,\n model_weight_creator.display_name as maybe_model_weight_creator_display_name,\n model_weight_creator.email_gravatar_hash as maybe_model_weight_creator_gravatar_hash,\n\n m.public_bucket_directory_hash,\n m.maybe_public_bucket_prefix,\n m.maybe_public_bucket_extension,\n\n entity_stats.ratings_positive_count as maybe_ratings_positive_count,\n entity_stats.ratings_negative_count as maybe_ratings_negative_count,\n entity_stats.bookmark_count as maybe_bookmark_count,\n\n featured_items.entity_token IS NOT NULL AS is_featured,\n\n m.created_at,\n m.updated_at\n\nFROM media_files AS m\nLEFT OUTER JOIN users\n ON m.maybe_creator_user_token = users.token\nLEFT OUTER JOIN model_weights\n ON m.maybe_origin_model_token = model_weights.token\nLEFT OUTER JOIN media_files as media_file_cover_image\n ON media_file_cover_image.token = m.maybe_cover_image_media_file_token\nLEFT OUTER JOIN media_files as model_weight_cover_image\n ON model_weight_cover_image.token = model_weights.maybe_cover_image_media_file_token\nLEFT OUTER JOIN users as model_weight_creator\n ON model_weight_creator.token = model_weights.creator_user_token\nLEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"media_file\"\n AND entity_stats.entity_token = m.token\nLEFT OUTER JOIN prompts\n ON prompts.token = m.maybe_prompt_token\nLEFT OUTER JOIN featured_items\n ON featured_items.entity_type = 'media_file'\n AND featured_items.entity_token = m.token\n AND featured_items.deleted_at IS NULL\nWHERE\n m.token = ?\n AND m.user_deleted_at IS NULL\n AND m.mod_deleted_at IS NULL\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -65,6 +65,16 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "maybe_mime_type",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "BINARY",
|
||||
"char_set": 224,
|
||||
"max_size": 128
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "maybe_creator_user_token: tokens::tokens::users::UserToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -74,7 +84,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"ordinal": 8,
|
||||
"name": "maybe_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -84,7 +94,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"ordinal": 9,
|
||||
"name": "maybe_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -94,7 +104,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"ordinal": 10,
|
||||
"name": "maybe_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -104,7 +114,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"ordinal": 11,
|
||||
"name": "maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -114,7 +124,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 11,
|
||||
"ordinal": 12,
|
||||
"name": "maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -124,7 +134,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 12,
|
||||
"ordinal": 13,
|
||||
"name": "maybe_style_transfer_source_media_file_token: tokens::tokens::media_files::MediaFileToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -134,7 +144,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"ordinal": 14,
|
||||
"name": "maybe_scene_source_media_file_token: tokens::tokens::media_files::MediaFileToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -144,7 +154,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"ordinal": 15,
|
||||
"name": "maybe_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -154,7 +164,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"ordinal": 16,
|
||||
"name": "maybe_text_transcript",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
@@ -164,7 +174,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"ordinal": 17,
|
||||
"name": "maybe_origin_filename",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -174,7 +184,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"ordinal": 18,
|
||||
"name": "maybe_duration_millis",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -184,7 +194,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 18,
|
||||
"ordinal": 19,
|
||||
"name": "maybe_prompt_token: tokens::tokens::prompts::PromptToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -194,7 +204,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 19,
|
||||
"ordinal": 20,
|
||||
"name": "maybe_other_prompt_args",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
@@ -204,7 +214,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 20,
|
||||
"ordinal": 21,
|
||||
"name": "maybe_file_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -214,7 +224,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 21,
|
||||
"ordinal": 22,
|
||||
"name": "maybe_file_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -224,7 +234,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 22,
|
||||
"ordinal": 23,
|
||||
"name": "maybe_file_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -234,7 +244,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 23,
|
||||
"ordinal": 24,
|
||||
"name": "creator_set_visibility: enums::common::visibility::Visibility",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -244,7 +254,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 24,
|
||||
"ordinal": 25,
|
||||
"name": "maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -254,7 +264,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 25,
|
||||
"ordinal": 26,
|
||||
"name": "maybe_model_weights_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -264,7 +274,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 26,
|
||||
"ordinal": 27,
|
||||
"name": "maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -274,7 +284,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 27,
|
||||
"ordinal": 28,
|
||||
"name": "maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -284,7 +294,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 28,
|
||||
"ordinal": 29,
|
||||
"name": "maybe_model_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -294,7 +304,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 29,
|
||||
"ordinal": 30,
|
||||
"name": "maybe_model_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -304,7 +314,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 30,
|
||||
"ordinal": 31,
|
||||
"name": "maybe_model_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -314,7 +324,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 31,
|
||||
"ordinal": 32,
|
||||
"name": "maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -324,7 +334,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 32,
|
||||
"ordinal": 33,
|
||||
"name": "maybe_model_weight_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -334,7 +344,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 33,
|
||||
"ordinal": 34,
|
||||
"name": "maybe_model_weight_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -344,7 +354,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 34,
|
||||
"ordinal": 35,
|
||||
"name": "maybe_model_weight_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -354,7 +364,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 35,
|
||||
"ordinal": 36,
|
||||
"name": "public_bucket_directory_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -364,7 +374,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 36,
|
||||
"ordinal": 37,
|
||||
"name": "maybe_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -374,7 +384,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 37,
|
||||
"ordinal": 38,
|
||||
"name": "maybe_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -384,7 +394,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 38,
|
||||
"ordinal": 39,
|
||||
"name": "maybe_ratings_positive_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -394,7 +404,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 39,
|
||||
"ordinal": 40,
|
||||
"name": "maybe_ratings_negative_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -404,7 +414,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 40,
|
||||
"ordinal": 41,
|
||||
"name": "maybe_bookmark_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -414,7 +424,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 41,
|
||||
"ordinal": 42,
|
||||
"name": "is_featured",
|
||||
"type_info": {
|
||||
"type": "LongLong",
|
||||
@@ -424,7 +434,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 42,
|
||||
"ordinal": 43,
|
||||
"name": "created_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -434,7 +444,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 43,
|
||||
"ordinal": 44,
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -471,6 +481,7 @@
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
@@ -494,5 +505,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "bfbe17ad0d993033c1015881f679fc27f5f16fb3edb24e30295c8188ff63d5cd"
|
||||
"hash": "58cb3fd03fb215b1d323f6aa6a5fd713900b9d931700c4226a1d9713b5e469c7"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nUPDATE generic_inference_jobs\nSET\n is_dismissed_by_user = TRUE\nWHERE maybe_creator_user_token = ?\nAND status IN (\n 'dead',\n 'cancelled_by_system',\n 'cancelled_by_user',\n 'complete_failure',\n 'complete_success'\n )\nAND created_at > DATE_SUB(NOW(), INTERVAL 36 HOUR)\nLIMIT 1000\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "a1d44611ee4a0ecc54548f95719f01341eb242460c79ef75423de96b31ed5385"
|
||||
}
|
||||
+50
-39
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nSELECT\n m.token as `token: tokens::tokens::media_files::MediaFileToken`,\n\n m.media_class as `media_class: enums::by_table::media_files::media_file_class::MediaFileClass`,\n m.media_type as `media_type: enums::by_table::media_files::media_file_type::MediaFileType`,\n\n m.maybe_engine_category as `maybe_engine_category: enums::by_table::media_files::media_file_engine_category::MediaFileEngineCategory`,\n m.maybe_animation_type as `maybe_animation_type: enums::by_table::media_files::media_file_animation_type::MediaFileAnimationType`,\n\n m.maybe_media_subtype as `maybe_media_subtype: enums::by_table::media_files::media_file_subtype::MediaFileSubtype`,\n\n users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n users.username as maybe_creator_username,\n users.display_name as maybe_creator_display_name,\n users.email_gravatar_hash as maybe_creator_gravatar_hash,\n\n m.maybe_creator_anonymous_visitor_token as `maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken`,\n\n m.maybe_batch_token as `maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken`,\n\n m.maybe_style_transfer_source_media_file_token as `maybe_style_transfer_source_media_file_token: tokens::tokens::media_files::MediaFileToken`,\n m.maybe_scene_source_media_file_token as `maybe_scene_source_media_file_token: tokens::tokens::media_files::MediaFileToken`,\n\n\n m.maybe_title,\n m.maybe_text_transcript,\n\n m.maybe_origin_filename,\n\n m.maybe_duration_millis,\n\n m.maybe_prompt_token as `maybe_prompt_token: tokens::tokens::prompts::PromptToken`,\n prompts.maybe_other_args as maybe_other_prompt_args,\n\n media_file_cover_image.public_bucket_directory_hash as maybe_file_cover_image_public_bucket_hash,\n media_file_cover_image.maybe_public_bucket_prefix as maybe_file_cover_image_public_bucket_prefix,\n media_file_cover_image.maybe_public_bucket_extension as maybe_file_cover_image_public_bucket_extension,\n\n m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n model_weights.token as `maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken`,\n model_weights.title as maybe_model_weights_title,\n model_weights.weights_type as `maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n model_weights.weights_category as `maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n model_weight_cover_image.public_bucket_directory_hash as maybe_model_cover_image_public_bucket_hash,\n model_weight_cover_image.maybe_public_bucket_prefix as maybe_model_cover_image_public_bucket_prefix,\n model_weight_cover_image.maybe_public_bucket_extension as maybe_model_cover_image_public_bucket_extension,\n\n model_weight_creator.token as `maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken`,\n model_weight_creator.username as maybe_model_weight_creator_username,\n model_weight_creator.display_name as maybe_model_weight_creator_display_name,\n model_weight_creator.email_gravatar_hash as maybe_model_weight_creator_gravatar_hash,\n\n m.public_bucket_directory_hash,\n m.maybe_public_bucket_prefix,\n m.maybe_public_bucket_extension,\n\n entity_stats.ratings_positive_count as maybe_ratings_positive_count,\n entity_stats.ratings_negative_count as maybe_ratings_negative_count,\n entity_stats.bookmark_count as maybe_bookmark_count,\n\n featured_items.entity_token IS NOT NULL AS is_featured,\n\n m.created_at,\n m.updated_at\n\nFROM media_files AS m\nLEFT OUTER JOIN users\n ON m.maybe_creator_user_token = users.token\nLEFT OUTER JOIN model_weights\n ON m.maybe_origin_model_token = model_weights.token\nLEFT OUTER JOIN media_files as media_file_cover_image\n ON media_file_cover_image.token = m.maybe_cover_image_media_file_token\nLEFT OUTER JOIN media_files as model_weight_cover_image\n ON model_weight_cover_image.token = model_weights.maybe_cover_image_media_file_token\nLEFT OUTER JOIN users as model_weight_creator\n ON model_weight_creator.token = model_weights.creator_user_token\nLEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"media_file\"\n AND entity_stats.entity_token = m.token\nLEFT OUTER JOIN prompts\n ON prompts.token = m.maybe_prompt_token\nLEFT OUTER JOIN featured_items\n ON featured_items.entity_type = 'media_file'\n AND featured_items.entity_token = m.token\n AND featured_items.deleted_at IS NULL\nWHERE\n m.token = ?\n AND m.user_deleted_at IS NULL\n AND m.mod_deleted_at IS NULL\n ",
|
||||
"query": "\nSELECT\n m.token as `token: tokens::tokens::media_files::MediaFileToken`,\n\n m.media_class as `media_class: enums::by_table::media_files::media_file_class::MediaFileClass`,\n m.media_type as `media_type: enums::by_table::media_files::media_file_type::MediaFileType`,\n\n m.maybe_engine_category as `maybe_engine_category: enums::by_table::media_files::media_file_engine_category::MediaFileEngineCategory`,\n m.maybe_animation_type as `maybe_animation_type: enums::by_table::media_files::media_file_animation_type::MediaFileAnimationType`,\n\n m.maybe_media_subtype as `maybe_media_subtype: enums::by_table::media_files::media_file_subtype::MediaFileSubtype`,\n\n m.maybe_mime_type,\n\n users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n users.username as maybe_creator_username,\n users.display_name as maybe_creator_display_name,\n users.email_gravatar_hash as maybe_creator_gravatar_hash,\n\n m.maybe_creator_anonymous_visitor_token as `maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken`,\n\n m.maybe_batch_token as `maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken`,\n\n m.maybe_style_transfer_source_media_file_token as `maybe_style_transfer_source_media_file_token: tokens::tokens::media_files::MediaFileToken`,\n m.maybe_scene_source_media_file_token as `maybe_scene_source_media_file_token: tokens::tokens::media_files::MediaFileToken`,\n\n m.maybe_title,\n m.maybe_text_transcript,\n\n m.maybe_origin_filename,\n\n m.maybe_duration_millis,\n\n m.maybe_prompt_token as `maybe_prompt_token: tokens::tokens::prompts::PromptToken`,\n prompts.maybe_other_args as maybe_other_prompt_args,\n\n media_file_cover_image.public_bucket_directory_hash as maybe_file_cover_image_public_bucket_hash,\n media_file_cover_image.maybe_public_bucket_prefix as maybe_file_cover_image_public_bucket_prefix,\n media_file_cover_image.maybe_public_bucket_extension as maybe_file_cover_image_public_bucket_extension,\n\n m.creator_set_visibility as `creator_set_visibility: enums::common::visibility::Visibility`,\n\n model_weights.token as `maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken`,\n model_weights.title as maybe_model_weights_title,\n model_weights.weights_type as `maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType`,\n model_weights.weights_category as `maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory`,\n\n model_weight_cover_image.public_bucket_directory_hash as maybe_model_cover_image_public_bucket_hash,\n model_weight_cover_image.maybe_public_bucket_prefix as maybe_model_cover_image_public_bucket_prefix,\n model_weight_cover_image.maybe_public_bucket_extension as maybe_model_cover_image_public_bucket_extension,\n\n model_weight_creator.token as `maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken`,\n model_weight_creator.username as maybe_model_weight_creator_username,\n model_weight_creator.display_name as maybe_model_weight_creator_display_name,\n model_weight_creator.email_gravatar_hash as maybe_model_weight_creator_gravatar_hash,\n\n m.public_bucket_directory_hash,\n m.maybe_public_bucket_prefix,\n m.maybe_public_bucket_extension,\n\n entity_stats.ratings_positive_count as maybe_ratings_positive_count,\n entity_stats.ratings_negative_count as maybe_ratings_negative_count,\n entity_stats.bookmark_count as maybe_bookmark_count,\n\n featured_items.entity_token IS NOT NULL AS is_featured,\n\n m.created_at,\n m.updated_at\n\nFROM media_files AS m\nLEFT OUTER JOIN users\n ON m.maybe_creator_user_token = users.token\nLEFT OUTER JOIN model_weights\n ON m.maybe_origin_model_token = model_weights.token\nLEFT OUTER JOIN media_files as media_file_cover_image\n ON media_file_cover_image.token = m.maybe_cover_image_media_file_token\nLEFT OUTER JOIN media_files as model_weight_cover_image\n ON model_weight_cover_image.token = model_weights.maybe_cover_image_media_file_token\nLEFT OUTER JOIN users as model_weight_creator\n ON model_weight_creator.token = model_weights.creator_user_token\nLEFT OUTER JOIN entity_stats\n ON entity_stats.entity_type = \"media_file\"\n AND entity_stats.entity_token = m.token\nLEFT OUTER JOIN prompts\n ON prompts.token = m.maybe_prompt_token\nLEFT OUTER JOIN featured_items\n ON featured_items.entity_type = 'media_file'\n AND featured_items.entity_token = m.token\n AND featured_items.deleted_at IS NULL\nWHERE\n m.token = ?\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -65,6 +65,16 @@
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "maybe_mime_type",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
"flags": "BINARY",
|
||||
"char_set": 224,
|
||||
"max_size": 128
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"name": "maybe_creator_user_token: tokens::tokens::users::UserToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -74,7 +84,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 7,
|
||||
"ordinal": 8,
|
||||
"name": "maybe_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -84,7 +94,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"ordinal": 9,
|
||||
"name": "maybe_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -94,7 +104,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"ordinal": 10,
|
||||
"name": "maybe_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -104,7 +114,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"ordinal": 11,
|
||||
"name": "maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -114,7 +124,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 11,
|
||||
"ordinal": 12,
|
||||
"name": "maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -124,7 +134,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 12,
|
||||
"ordinal": 13,
|
||||
"name": "maybe_style_transfer_source_media_file_token: tokens::tokens::media_files::MediaFileToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -134,7 +144,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"ordinal": 14,
|
||||
"name": "maybe_scene_source_media_file_token: tokens::tokens::media_files::MediaFileToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -144,7 +154,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"ordinal": 15,
|
||||
"name": "maybe_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -154,7 +164,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"ordinal": 16,
|
||||
"name": "maybe_text_transcript",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
@@ -164,7 +174,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"ordinal": 17,
|
||||
"name": "maybe_origin_filename",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -174,7 +184,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"ordinal": 18,
|
||||
"name": "maybe_duration_millis",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -184,7 +194,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 18,
|
||||
"ordinal": 19,
|
||||
"name": "maybe_prompt_token: tokens::tokens::prompts::PromptToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -194,7 +204,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 19,
|
||||
"ordinal": 20,
|
||||
"name": "maybe_other_prompt_args",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
@@ -204,7 +214,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 20,
|
||||
"ordinal": 21,
|
||||
"name": "maybe_file_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -214,7 +224,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 21,
|
||||
"ordinal": 22,
|
||||
"name": "maybe_file_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -224,7 +234,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 22,
|
||||
"ordinal": 23,
|
||||
"name": "maybe_file_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -234,7 +244,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 23,
|
||||
"ordinal": 24,
|
||||
"name": "creator_set_visibility: enums::common::visibility::Visibility",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -244,7 +254,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 24,
|
||||
"ordinal": 25,
|
||||
"name": "maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -254,7 +264,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 25,
|
||||
"ordinal": 26,
|
||||
"name": "maybe_model_weights_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -264,7 +274,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 26,
|
||||
"ordinal": 27,
|
||||
"name": "maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -274,7 +284,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 27,
|
||||
"ordinal": 28,
|
||||
"name": "maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -284,7 +294,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 28,
|
||||
"ordinal": 29,
|
||||
"name": "maybe_model_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -294,7 +304,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 29,
|
||||
"ordinal": 30,
|
||||
"name": "maybe_model_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -304,7 +314,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 30,
|
||||
"ordinal": 31,
|
||||
"name": "maybe_model_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -314,7 +324,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 31,
|
||||
"ordinal": 32,
|
||||
"name": "maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -324,7 +334,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 32,
|
||||
"ordinal": 33,
|
||||
"name": "maybe_model_weight_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -334,7 +344,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 33,
|
||||
"ordinal": 34,
|
||||
"name": "maybe_model_weight_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -344,7 +354,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 34,
|
||||
"ordinal": 35,
|
||||
"name": "maybe_model_weight_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -354,7 +364,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 35,
|
||||
"ordinal": 36,
|
||||
"name": "public_bucket_directory_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -364,7 +374,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 36,
|
||||
"ordinal": 37,
|
||||
"name": "maybe_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -374,7 +384,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 37,
|
||||
"ordinal": 38,
|
||||
"name": "maybe_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -384,7 +394,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 38,
|
||||
"ordinal": 39,
|
||||
"name": "maybe_ratings_positive_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -394,7 +404,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 39,
|
||||
"ordinal": 40,
|
||||
"name": "maybe_ratings_negative_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -404,7 +414,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 40,
|
||||
"ordinal": 41,
|
||||
"name": "maybe_bookmark_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -414,7 +424,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 41,
|
||||
"ordinal": 42,
|
||||
"name": "is_featured",
|
||||
"type_info": {
|
||||
"type": "LongLong",
|
||||
@@ -424,7 +434,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 42,
|
||||
"ordinal": 43,
|
||||
"name": "created_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -434,7 +444,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 43,
|
||||
"ordinal": 44,
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -471,6 +481,7 @@
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
@@ -494,5 +505,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "beda05b1f3e3f78ca2610c491e682ea1c76fb5effccd5d710761353baf8ce161"
|
||||
"hash": "f1861dc84015b5c753cb5c31313c747386bce56983108fd6a01815d02d429630"
|
||||
}
|
||||
Generated
+1340
-1248
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,6 @@ members = [
|
||||
"crates/lib/api_clients/cloud_storage",
|
||||
"crates/lib/api_clients/google_drive_common",
|
||||
"crates/lib/api_clients/thumbnail_generator",
|
||||
"crates/lib/api_clients/twitch_common",
|
||||
"crates/lib/bootstrap",
|
||||
"crates/lib/caching/memory_caching",
|
||||
"crates/lib/caching/redis_caching",
|
||||
@@ -82,10 +81,8 @@ members = [
|
||||
"crates/service/job/tts_inference_job",
|
||||
"crates/service/job/w2l_download_job",
|
||||
"crates/service/job/w2l_inference_job",
|
||||
"crates/service/other/twitch_pubsub_subscriber",
|
||||
"crates/service/web/dummy_service",
|
||||
"crates/service/web/storyteller_web",
|
||||
"crates/service/web/websocket_gateway",
|
||||
|
||||
# Service Plugins: complete subsystems that can be plugged into services (users, billing, etc.)
|
||||
"crates/service/plugins/billing",
|
||||
|
||||
@@ -94,6 +94,7 @@ SET
|
||||
can_access_studio = false,
|
||||
maybe_feature_flags = 'studio,video_style_transfer'
|
||||
WHERE username IN (
|
||||
'FoxtailStudio',
|
||||
'chechisauri0',
|
||||
'dakrid',
|
||||
'omega7321',
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
select *
|
||||
from generic_inference_jobs
|
||||
where job_type = 'comfy_ui'
|
||||
and status NOT IN (
|
||||
'pending',
|
||||
'started',
|
||||
'complete_success'
|
||||
)
|
||||
order by id desc
|
||||
limit 5\G
|
||||
|
||||
@@ -11,7 +11,7 @@ from media_files as m
|
||||
join users as u
|
||||
on m.maybe_creator_user_token = u.token
|
||||
where u.can_access_studio = true
|
||||
and m.created_at > (CURDATE() - INTERVAL 1 WEEK)
|
||||
and m.created_at > (CURDATE() - INTERVAL 1 DAY)
|
||||
and m.is_intermediate_system_file = false
|
||||
and m.media_class = 'video'
|
||||
group by u.token
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Enroll internal accounts in studio + loyalty features
|
||||
UPDATE users
|
||||
SET
|
||||
can_access_studio = true,
|
||||
maybe_feature_flags = 'explore_media,studio,video_style_transfer',
|
||||
maybe_loyalty_program_key = 'fakeyou_contributor',
|
||||
user_role_slug = "admin"
|
||||
WHERE username IN (
|
||||
'48hourfilm',
|
||||
'intro_video',
|
||||
'zzz_last_item'
|
||||
)
|
||||
LIMIT 5;
|
||||
@@ -199,7 +199,7 @@ CREATE TABLE generic_inference_jobs (
|
||||
attempt_count SMALLINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
|
||||
-- If the user chooses to no longer display or poll the job, we mark this flag true.
|
||||
-- This can only be set for terminal state (completed or failed) jobs.
|
||||
-- This should only be set for terminal state (completed or failed) jobs.
|
||||
-- We use this flag to remove the job from the user's view.
|
||||
is_dismissed_by_user BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
|
||||
|
||||
+26
-21
@@ -1,29 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="//unpkg.com/swagger-ui-dist@3/swagger-ui.css">
|
||||
|
||||
<title>Storyteller API</title>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="description" content="SwaggerUI" />
|
||||
<title>Storyteller API</title>
|
||||
<link rel="stylesheet" href="//unpkg.com/swagger-ui-dist@5.11.0/swagger-ui.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app-docs" />
|
||||
|
||||
<script src="//unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
|
||||
<script>
|
||||
<div id="swagger-ui"></div>
|
||||
|
||||
window.onload = function () {
|
||||
const ui = SwaggerUIBundle({
|
||||
url: "api.json",
|
||||
dom_id: "#app-docs",
|
||||
<script src="//unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-bundle.js" crossorigin></script>
|
||||
<script src="//unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-standalone-preset.js" crossorigin></script>
|
||||
<script>
|
||||
window.onload = () => {
|
||||
window.ui = SwaggerUIBundle({
|
||||
url: 'api.json',
|
||||
dom_id: '#swagger-ui',
|
||||
deepLinking: true,
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
presets: [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
SwaggerUIStandalonePreset
|
||||
],
|
||||
layout: "StandaloneLayout",
|
||||
tagsSorter: 'alpha', // Sort tags (endpoint groupings) alphabetically
|
||||
defaultModelRendering: 'model', // Show model instead of "example request"
|
||||
defaultModelExpandDepth: 6,
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ utoipa = { version = "4", features = ["chrono","actix_extras"] }
|
||||
[dev-dependencies]
|
||||
|
||||
# Enum utilities
|
||||
strum = { version = "0.25", features = ["derive"] }
|
||||
strum = { version = "0.26", features = ["derive"] }
|
||||
|
||||
# Test serialization
|
||||
serde_json = "1.0.108"
|
||||
toml = "0.5.8"
|
||||
toml = "0.8.14"
|
||||
|
||||
@@ -16,32 +16,45 @@ use utoipa::ToSchema;
|
||||
#[cfg_attr(test, derive(EnumIter, EnumCount))]
|
||||
#[derive(Clone, Copy, Eq, PartialEq, Hash, Ord, PartialOrd, Deserialize, Serialize, Default, ToSchema)]
|
||||
pub enum InferenceCategory {
|
||||
/// Eg. SadTalker and possibly Wav2Lip
|
||||
/// Facial lipsync animation (eg. SadTalker, Wav2Lip)
|
||||
#[serde(rename = "lipsync_animation")]
|
||||
#[default]
|
||||
LipsyncAnimation,
|
||||
|
||||
/// FakeYou's text to speech (eg. Tacotron2)
|
||||
#[serde(rename = "text_to_speech")]
|
||||
TextToSpeech,
|
||||
|
||||
/// FakeYou's voice conversion (eg. svc, rvc)
|
||||
#[serde(rename = "voice_conversion")]
|
||||
VoiceConversion,
|
||||
|
||||
#[serde(rename = "video_filter")]
|
||||
VideoFilter,
|
||||
|
||||
/// Image generation (eg. Stable Diffusion 1.5)
|
||||
#[serde(rename = "image_generation")]
|
||||
ImageGeneration,
|
||||
|
||||
/// Turn video into animation data with mocap processing (eg. Mocapnet).
|
||||
#[serde(rename = "mocap")]
|
||||
Mocap,
|
||||
|
||||
/// ComfyUI workflows
|
||||
/// This is what powers Storyteller Studio!
|
||||
#[serde(rename = "workflow")]
|
||||
Workflow,
|
||||
|
||||
/// FBX to GLTF/GLB.
|
||||
/// Still supported, but few people will use it.
|
||||
#[serde(rename = "format_conversion")]
|
||||
FormatConversion,
|
||||
|
||||
/// DEPRECATED. Do not use.
|
||||
/// This was for ReRenderAVideo, which we never productionized.
|
||||
#[deprecated(note = "This was for ReRenderAVideo, which we never productionized.")]
|
||||
#[serde(rename = "video_filter")]
|
||||
VideoFilter,
|
||||
|
||||
/// DEPRECATED. Bevy engine serverside rendering.
|
||||
#[deprecated(note = "This was for Bevy engine's server side rendering.")]
|
||||
#[serde(rename = "convert_bvh_to_workflow")]
|
||||
ConvertBvhToWorkflow,
|
||||
}
|
||||
@@ -58,11 +71,11 @@ impl InferenceCategory {
|
||||
Self::LipsyncAnimation => "lipsync_animation",
|
||||
Self::TextToSpeech => "text_to_speech",
|
||||
Self::VoiceConversion => "voice_conversion",
|
||||
Self::VideoFilter => "video_filter",
|
||||
Self::ImageGeneration => "image_generation",
|
||||
Self::Mocap => "mocap",
|
||||
Self::Workflow => "workflow",
|
||||
Self::FormatConversion => "format_conversion",
|
||||
Self::VideoFilter => "video_filter",
|
||||
Self::ConvertBvhToWorkflow => "convert_bvh_to_workflow",
|
||||
}
|
||||
}
|
||||
@@ -72,11 +85,11 @@ impl InferenceCategory {
|
||||
"lipsync_animation" => Ok(Self::LipsyncAnimation),
|
||||
"text_to_speech" => Ok(Self::TextToSpeech),
|
||||
"voice_conversion" => Ok(Self::VoiceConversion),
|
||||
"video_filter" => Ok(Self::VideoFilter),
|
||||
"image_generation" => Ok(Self::ImageGeneration),
|
||||
"mocap" => Ok(Self::Mocap),
|
||||
"workflow" => Ok(Self::Workflow),
|
||||
"format_conversion" => Ok(Self::FormatConversion),
|
||||
"video_filter" => Ok(Self::VideoFilter),
|
||||
"convert_bvh_to_workflow" => Ok(Self::ConvertBvhToWorkflow),
|
||||
_ => Err(format!("invalid value: {:?}", value)),
|
||||
}
|
||||
@@ -89,11 +102,11 @@ impl InferenceCategory {
|
||||
Self::LipsyncAnimation,
|
||||
Self::TextToSpeech,
|
||||
Self::VoiceConversion,
|
||||
Self::VideoFilter,
|
||||
Self::ImageGeneration,
|
||||
Self::Mocap,
|
||||
Self::Workflow,
|
||||
Self::FormatConversion,
|
||||
Self::VideoFilter,
|
||||
Self::ConvertBvhToWorkflow,
|
||||
])
|
||||
}
|
||||
@@ -112,11 +125,11 @@ mod tests {
|
||||
assert_serialization(InferenceCategory::LipsyncAnimation, "lipsync_animation");
|
||||
assert_serialization(InferenceCategory::TextToSpeech, "text_to_speech");
|
||||
assert_serialization(InferenceCategory::VoiceConversion, "voice_conversion");
|
||||
assert_serialization(InferenceCategory::VideoFilter, "video_filter");
|
||||
assert_serialization(InferenceCategory::ImageGeneration, "image_generation");
|
||||
assert_serialization(InferenceCategory::Mocap, "mocap");
|
||||
assert_serialization(InferenceCategory::Workflow, "workflow");
|
||||
assert_serialization(InferenceCategory::FormatConversion, "format_conversion");
|
||||
assert_serialization(InferenceCategory::VideoFilter, "video_filter");
|
||||
assert_serialization(InferenceCategory::ConvertBvhToWorkflow, "convert_bvh_to_workflow");
|
||||
}
|
||||
|
||||
@@ -125,11 +138,11 @@ mod tests {
|
||||
assert_eq!(InferenceCategory::LipsyncAnimation.to_str(), "lipsync_animation");
|
||||
assert_eq!(InferenceCategory::TextToSpeech.to_str(), "text_to_speech");
|
||||
assert_eq!(InferenceCategory::VoiceConversion.to_str(), "voice_conversion");
|
||||
assert_eq!(InferenceCategory::VideoFilter.to_str(), "video_filter");
|
||||
assert_eq!(InferenceCategory::ImageGeneration.to_str(), "image_generation");
|
||||
assert_eq!(InferenceCategory::Mocap.to_str(), "mocap");
|
||||
assert_eq!(InferenceCategory::Workflow.to_str(), "workflow");
|
||||
assert_eq!(InferenceCategory::FormatConversion.to_str(), "format_conversion");
|
||||
assert_eq!(InferenceCategory::VideoFilter.to_str(), "video_filter");
|
||||
assert_eq!(InferenceCategory::ConvertBvhToWorkflow.to_str(), "convert_bvh_to_workflow");
|
||||
}
|
||||
|
||||
@@ -138,11 +151,11 @@ mod tests {
|
||||
assert_eq!(InferenceCategory::from_str("lipsync_animation").unwrap(), InferenceCategory::LipsyncAnimation);
|
||||
assert_eq!(InferenceCategory::from_str("text_to_speech").unwrap(), InferenceCategory::TextToSpeech);
|
||||
assert_eq!(InferenceCategory::from_str("voice_conversion").unwrap(), InferenceCategory::VoiceConversion);
|
||||
assert_eq!(InferenceCategory::from_str("video_filter").unwrap(), InferenceCategory::VideoFilter);
|
||||
assert_eq!(InferenceCategory::from_str("image_generation").unwrap(), InferenceCategory::ImageGeneration);
|
||||
assert_eq!(InferenceCategory::from_str("mocap").unwrap(), InferenceCategory::Mocap);
|
||||
assert_eq!(InferenceCategory::from_str("workflow").unwrap(), InferenceCategory::Workflow);
|
||||
assert_eq!(InferenceCategory::from_str("format_conversion").unwrap(), InferenceCategory::FormatConversion);
|
||||
assert_eq!(InferenceCategory::from_str("video_filter").unwrap(), InferenceCategory::VideoFilter);
|
||||
assert_eq!(InferenceCategory::from_str("convert_bvh_to_workflow").unwrap(), InferenceCategory::ConvertBvhToWorkflow);
|
||||
}
|
||||
|
||||
@@ -154,11 +167,11 @@ mod tests {
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::LipsyncAnimation));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::TextToSpeech));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::VoiceConversion));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::VideoFilter));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::ImageGeneration));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::Mocap));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::Workflow));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::FormatConversion));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::VideoFilter));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceCategory::ConvertBvhToWorkflow));
|
||||
assert_eq!(variants.pop_first(), None);
|
||||
|
||||
|
||||
@@ -15,10 +15,6 @@ use strum::EnumIter;
|
||||
#[derive(Clone, Copy, Eq, PartialEq, Hash, Ord, PartialOrd, Deserialize, Serialize, Default)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum InferenceJobType {
|
||||
/// Job that converts bevy to workflow files
|
||||
#[serde(rename = "bevy_to_workflow")]
|
||||
BevyToWorkflow,
|
||||
|
||||
/// Jobs that run ComfyUI workflows
|
||||
ComfyUi,
|
||||
|
||||
@@ -29,10 +25,6 @@ pub enum InferenceJobType {
|
||||
/// Process a video into BVH mocap animation data for game engines
|
||||
MocapNet,
|
||||
|
||||
/// Re-render a video is a video style transfer algorithm. We developed code
|
||||
/// around it, but chose to develop AnimateDiff / ComfyUI support instead.
|
||||
RerenderAVideo,
|
||||
|
||||
/// RVC is a voice conversion model. RVCv2 is the most popular such model currently.
|
||||
#[serde(rename = "rvc_v2")]
|
||||
RvcV2,
|
||||
@@ -58,6 +50,18 @@ pub enum InferenceJobType {
|
||||
/// (i.e. when we backfill the database column and make it non-nullable)
|
||||
#[default]
|
||||
Unknown,
|
||||
|
||||
/// DEPRECATED. DO NOT USE.
|
||||
/// Job that converts bevy to workflow files
|
||||
#[deprecated(note = "This was for Bevy engine's server side rendering.")]
|
||||
#[serde(rename = "bevy_to_workflow")]
|
||||
BevyToWorkflow,
|
||||
|
||||
#[deprecated(note = "This was for ReRenderAVideo, which we never productionized.")]
|
||||
/// DEPRECATED. DO NOT USE.
|
||||
/// Re-render a video is a video style transfer algorithm. We developed code
|
||||
/// around it, but chose to develop AnimateDiff / ComfyUI support instead.
|
||||
RerenderAVideo,
|
||||
}
|
||||
|
||||
// TODO(bt, 2022-12-21): This desperately needs MySQL integration tests!
|
||||
@@ -68,11 +72,9 @@ impl_mysql_enum_coders!(InferenceJobType);
|
||||
impl InferenceJobType {
|
||||
pub fn to_str(&self) -> &'static str {
|
||||
match self {
|
||||
Self::BevyToWorkflow => "bevy_to_workflow",
|
||||
Self::ComfyUi => "comfy_ui",
|
||||
Self::ConvertFbxToGltf => "convert_fbx_gltf",
|
||||
Self::MocapNet => "mocap_net",
|
||||
Self::RerenderAVideo => "rerender_a_video",
|
||||
Self::RvcV2 => "rvc_v2",
|
||||
Self::SadTalker => "sad_talker",
|
||||
Self::SoVitsSvc => "so_vits_svc",
|
||||
@@ -80,16 +82,16 @@ impl InferenceJobType {
|
||||
Self::StyleTTS2 => "styletts2",
|
||||
Self::Tacotron2 => "tacotron2",
|
||||
Self::Unknown => "unknown",
|
||||
Self::BevyToWorkflow => "bevy_to_workflow",
|
||||
Self::RerenderAVideo => "rerender_a_video",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_str(value: &str) -> Result<Self, String> {
|
||||
match value {
|
||||
"bevy_to_workflow" => Ok(Self::BevyToWorkflow),
|
||||
"comfy_ui" => Ok(Self::ComfyUi),
|
||||
"convert_fbx_gltf" => Ok(Self::ConvertFbxToGltf),
|
||||
"mocap_net" => Ok(Self::MocapNet),
|
||||
"rerender_a_video" => Ok(Self::RerenderAVideo),
|
||||
"rvc_v2" => Ok(Self::RvcV2),
|
||||
"sad_talker" => Ok(Self::SadTalker),
|
||||
"so_vits_svc" => Ok(Self::SoVitsSvc),
|
||||
@@ -97,6 +99,8 @@ impl InferenceJobType {
|
||||
"styletts2" => Ok(Self::StyleTTS2),
|
||||
"tacotron2" => Ok(Self::Tacotron2),
|
||||
"unknown" => Ok(Self::Unknown),
|
||||
"bevy_to_workflow" => Ok(Self::BevyToWorkflow),
|
||||
"rerender_a_video" => Ok(Self::RerenderAVideo),
|
||||
_ => Err(format!("invalid value: {:?}", value)),
|
||||
}
|
||||
}
|
||||
@@ -105,11 +109,9 @@ impl InferenceJobType {
|
||||
// NB: BTreeSet is sorted
|
||||
// NB: BTreeSet::from() isn't const, but not worth using LazyStatic, etc.
|
||||
BTreeSet::from([
|
||||
Self::BevyToWorkflow,
|
||||
Self::ComfyUi,
|
||||
Self::ConvertFbxToGltf,
|
||||
Self::MocapNet,
|
||||
Self::RerenderAVideo,
|
||||
Self::RvcV2,
|
||||
Self::SadTalker,
|
||||
Self::SoVitsSvc,
|
||||
@@ -117,6 +119,8 @@ impl InferenceJobType {
|
||||
Self::StyleTTS2,
|
||||
Self::Tacotron2,
|
||||
Self::Unknown,
|
||||
Self::BevyToWorkflow,
|
||||
Self::RerenderAVideo,
|
||||
])
|
||||
}
|
||||
}
|
||||
@@ -136,11 +140,9 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_serialization() {
|
||||
assert_serialization(InferenceJobType::BevyToWorkflow, "bevy_to_workflow");
|
||||
assert_serialization(InferenceJobType::ComfyUi, "comfy_ui");
|
||||
assert_serialization(InferenceJobType::ConvertFbxToGltf, "convert_fbx_gltf");
|
||||
assert_serialization(InferenceJobType::MocapNet, "mocap_net");
|
||||
assert_serialization(InferenceJobType::RerenderAVideo, "rerender_a_video");
|
||||
assert_serialization(InferenceJobType::RvcV2, "rvc_v2");
|
||||
assert_serialization(InferenceJobType::SadTalker, "sad_talker");
|
||||
assert_serialization(InferenceJobType::SoVitsSvc, "so_vits_svc");
|
||||
@@ -148,15 +150,15 @@ mod tests {
|
||||
assert_serialization(InferenceJobType::StyleTTS2, "styletts2");
|
||||
assert_serialization(InferenceJobType::Tacotron2, "tacotron2");
|
||||
assert_serialization(InferenceJobType::Unknown, "unknown");
|
||||
assert_serialization(InferenceJobType::BevyToWorkflow, "bevy_to_workflow");
|
||||
assert_serialization(InferenceJobType::RerenderAVideo, "rerender_a_video");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn to_str() {
|
||||
assert_eq!(InferenceJobType::BevyToWorkflow.to_str(), "bevy_to_workflow");
|
||||
assert_eq!(InferenceJobType::ComfyUi.to_str(), "comfy_ui");
|
||||
assert_eq!(InferenceJobType::ConvertFbxToGltf.to_str(), "convert_fbx_gltf");
|
||||
assert_eq!(InferenceJobType::MocapNet.to_str(), "mocap_net");
|
||||
assert_eq!(InferenceJobType::RerenderAVideo.to_str(), "rerender_a_video");
|
||||
assert_eq!(InferenceJobType::RvcV2.to_str(), "rvc_v2");
|
||||
assert_eq!(InferenceJobType::SadTalker.to_str(), "sad_talker");
|
||||
assert_eq!(InferenceJobType::SoVitsSvc.to_str(), "so_vits_svc");
|
||||
@@ -164,15 +166,15 @@ mod tests {
|
||||
assert_eq!(InferenceJobType::StyleTTS2.to_str(), "styletts2");
|
||||
assert_eq!(InferenceJobType::Tacotron2.to_str(), "tacotron2");
|
||||
assert_eq!(InferenceJobType::Unknown.to_str(), "unknown");
|
||||
assert_eq!(InferenceJobType::BevyToWorkflow.to_str(), "bevy_to_workflow");
|
||||
assert_eq!(InferenceJobType::RerenderAVideo.to_str(), "rerender_a_video");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn from_str() {
|
||||
assert_eq!(InferenceJobType::from_str("bevy_to_workflow").unwrap(), InferenceJobType::BevyToWorkflow);
|
||||
assert_eq!(InferenceJobType::from_str("comfy_ui").unwrap(), InferenceJobType::ComfyUi);
|
||||
assert_eq!(InferenceJobType::from_str("convert_fbx_gltf").unwrap(), InferenceJobType::ConvertFbxToGltf);
|
||||
assert_eq!(InferenceJobType::from_str("mocap_net").unwrap(), InferenceJobType::MocapNet);
|
||||
assert_eq!(InferenceJobType::from_str("rerender_a_video").unwrap(), InferenceJobType::RerenderAVideo);
|
||||
assert_eq!(InferenceJobType::from_str("rvc_v2").unwrap(), InferenceJobType::RvcV2);
|
||||
assert_eq!(InferenceJobType::from_str("sad_talker").unwrap(), InferenceJobType::SadTalker);
|
||||
assert_eq!(InferenceJobType::from_str("so_vits_svc").unwrap(), InferenceJobType::SoVitsSvc);
|
||||
@@ -180,6 +182,8 @@ mod tests {
|
||||
assert_eq!(InferenceJobType::from_str("styletts2").unwrap(), InferenceJobType::StyleTTS2);
|
||||
assert_eq!(InferenceJobType::from_str("tacotron2").unwrap(), InferenceJobType::Tacotron2);
|
||||
assert_eq!(InferenceJobType::from_str("unknown").unwrap(), InferenceJobType::Unknown);
|
||||
assert_eq!(InferenceJobType::from_str("bevy_to_workflow").unwrap(), InferenceJobType::BevyToWorkflow);
|
||||
assert_eq!(InferenceJobType::from_str("rerender_a_video").unwrap(), InferenceJobType::RerenderAVideo);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -187,11 +191,9 @@ mod tests {
|
||||
// Static check
|
||||
let mut variants = InferenceJobType::all_variants();
|
||||
assert_eq!(variants.len(), 12);
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::BevyToWorkflow));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::ComfyUi));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::ConvertFbxToGltf));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::MocapNet));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::RerenderAVideo));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::RvcV2));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::SadTalker));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::SoVitsSvc));
|
||||
@@ -199,6 +201,8 @@ mod tests {
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::StyleTTS2));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::Tacotron2));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::Unknown));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::BevyToWorkflow));
|
||||
assert_eq!(variants.pop_first(), Some(InferenceJobType::RerenderAVideo));
|
||||
assert_eq!(variants.pop_first(), None);
|
||||
|
||||
// Generated check
|
||||
|
||||
@@ -36,4 +36,4 @@ sqlx = { version = "0.7.2", features = [ "mysql", "runtime-tokio", "tls-rustls",
|
||||
[dev-dependencies]
|
||||
# Test serialization
|
||||
#serde_json = "1.0.64"
|
||||
toml = "0.5.8"
|
||||
toml = "0.8.14"
|
||||
|
||||
@@ -41,8 +41,8 @@ utoipa = { version = "4", features = ["chrono","actix_extras"] }
|
||||
[dev-dependencies]
|
||||
|
||||
# Enum utilities
|
||||
strum = { version = "0.25", features = ["derive"] }
|
||||
strum = { version = "0.26", features = ["derive"] }
|
||||
|
||||
# Test serialization
|
||||
serde_json = "1.0.108"
|
||||
toml = "0.5.8"
|
||||
toml = "0.8.14"
|
||||
|
||||
@@ -16,10 +16,9 @@ path = "src/main.rs"
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
container_common = { path = "../../../lib/deprecated/container_common" }
|
||||
easyenv = { path = "../../../lib/easyenv" }
|
||||
errors = { path = "../../../lib/errors" }
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use log::info;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use easyenv::init_all_with_default_logging;
|
||||
use errors::AnyhowResult;
|
||||
|
||||
fn main() -> AnyhowResult<()> {
|
||||
init_all_with_default_logging(None);
|
||||
|
||||
@@ -18,7 +18,6 @@ normal = ["my-workspace-hack"]
|
||||
[dependencies]
|
||||
# Internal
|
||||
buckets = { path = "../../../_types/buckets" }
|
||||
container_common = { path = "../../../lib/deprecated/container_common" }
|
||||
easyenv = { path = "../../../lib/easyenv" }
|
||||
enums = { path = "../../../_types/enums" }
|
||||
errors = { path = "../../../lib/errors" }
|
||||
@@ -32,7 +31,7 @@ my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
# External
|
||||
clap = "4.4.8"
|
||||
dotenv = "0.15.0"
|
||||
itertools = "0.11.0"
|
||||
itertools = "0.13.0"
|
||||
log = "0.4.14"
|
||||
|
||||
# Bigger pieces
|
||||
|
||||
@@ -2,8 +2,8 @@ use log::info;
|
||||
use sqlx::{MySql, Pool};
|
||||
use sqlx::mysql::MySqlPoolOptions;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use easyenv::init_all_with_default_logging;
|
||||
use errors::AnyhowResult;
|
||||
|
||||
use crate::cli_args::Action;
|
||||
use crate::operations::delete_all_anonymous_user_images::delete_all_anonymous_user_images::delete_all_anonymous_user_images;
|
||||
|
||||
@@ -33,7 +33,7 @@ my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
# External
|
||||
clap = "4.4.8"
|
||||
log = "0.4.14"
|
||||
strum = { version = "0.25", features = ["derive"] }
|
||||
strum = { version = "0.26", features = ["derive"] }
|
||||
|
||||
# Bigger pieces
|
||||
tokio = { version = "1.34.0", features = ["macros"] }
|
||||
|
||||
@@ -35,7 +35,7 @@ my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
# External
|
||||
clap = "4.4.8"
|
||||
log = "0.4.14"
|
||||
strum = { version = "0.25", features = ["derive"] }
|
||||
strum = { version = "0.26", features = ["derive"] }
|
||||
tempdir = "0.3.7"
|
||||
|
||||
# Async + clients
|
||||
|
||||
@@ -29,10 +29,10 @@ log = "0.4.14"
|
||||
|
||||
# Actix
|
||||
actix-cors = "0.6.4"
|
||||
actix-http = "3.4.0"
|
||||
actix-web = "4.4.0"
|
||||
actix-http = "3.7.0"
|
||||
actix-web = "4.7.0"
|
||||
url = { version = "2.5.0", features = [] }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-rt = "2.9.0"
|
||||
actix-rt = "2.10.0"
|
||||
speculoos = "0.11.0" # Fluent assertions
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
pub (crate) mod development_only;
|
||||
pub (crate) mod fakeyou;
|
||||
pub (crate) mod gottagofast;
|
||||
pub (crate) mod storyteller_studio;
|
||||
pub (crate) mod legacy;
|
||||
pub (crate) mod storyteller;
|
||||
+33
-8
@@ -2,14 +2,17 @@ use actix_cors::Cors;
|
||||
|
||||
use crate::util::netlify_branch_domain_matches::netlify_branch_domain_matches;
|
||||
|
||||
pub fn add_gotta_go_fast_test_branches(cors: Cors, _is_production: bool) -> Cors {
|
||||
cors.allowed_origin("http://localhost:5173")
|
||||
.allowed_origin_fn(|origin, _req_head| {
|
||||
netlify_branch_domain_matches(origin, "pipeline-gottagofast.netlify.app")
|
||||
})
|
||||
pub fn add_storyteller_studio(cors: Cors, _is_production: bool) -> Cors {
|
||||
cors.allowed_origin("https://studio.storyteller.ai")
|
||||
.allowed_origin("https://studio-staging.studio.storyteller.ai")
|
||||
.allowed_origin("https://studio-testing.studio.storyteller.ai")
|
||||
.allowed_origin_fn(|origin, _req_head| {
|
||||
netlify_branch_domain_matches(origin, "storytellerstudio.netlify.app")
|
||||
})
|
||||
.allowed_origin_fn(|origin, _req_head| {
|
||||
netlify_branch_domain_matches(origin, "pipeline-gottagofast.netlify.app")
|
||||
})
|
||||
.allowed_origin("http://localhost:5173")
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -54,17 +57,39 @@ mod tests {
|
||||
#[actix_rt::test]
|
||||
async fn studio_main() {
|
||||
let production_cors = build_cors_config(ServerEnvironment::Production);
|
||||
assert_origin_ok(&production_cors, "https://storytellerstudio.netlify.app").await;
|
||||
assert_origin_ok(&production_cors, "https://studio.storyteller.ai").await;
|
||||
assert_origin_invalid(&production_cors, "https://studiofake.storyteller.ai").await;
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn studio_branch_deploy() {
|
||||
async fn studio_staging() {
|
||||
let production_cors = build_cors_config(ServerEnvironment::Production);
|
||||
assert_origin_ok(&production_cors, "https://studio-staging.studio.storyteller.ai").await;
|
||||
assert_origin_invalid(&production_cors, "https://studio-staging-fake.studio.storyteller.ai").await;
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn studio_testing() {
|
||||
let production_cors = build_cors_config(ServerEnvironment::Production);
|
||||
assert_origin_ok(&production_cors, "https://studio-testing.studio.storyteller.ai").await;
|
||||
assert_origin_invalid(&production_cors, "https://studio-testing-fake.studio.storyteller.ai").await;
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn studio_netlify() {
|
||||
let production_cors = build_cors_config(ServerEnvironment::Production);
|
||||
assert_origin_ok(&production_cors, "https://storytellerstudio.netlify.app").await;
|
||||
assert_origin_invalid(&production_cors, "https://storytellerstudiofake.netlify.app").await;
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn studio_netlify_branch_deploy() {
|
||||
let production_cors = build_cors_config(ServerEnvironment::Production);
|
||||
assert_origin_ok(&production_cors, "https://foo--storytellerstudio.netlify.app").await;
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn studio_deploy_preview() {
|
||||
async fn studio_netlify_deploy_preview() {
|
||||
let production_cors = build_cors_config(ServerEnvironment::Production);
|
||||
assert_origin_ok(&production_cors, "https://deploy-preview-123--storytellerstudio.netlify.app").await;
|
||||
}
|
||||
@@ -5,7 +5,7 @@ use reusable_types::server_environment::ServerEnvironment;
|
||||
|
||||
use crate::configs::development_only::add_development_only;
|
||||
use crate::configs::fakeyou::{add_fakeyou, add_fakeyou_dev_proxy};
|
||||
use crate::configs::gottagofast::add_gotta_go_fast_test_branches;
|
||||
use crate::configs::storyteller_studio::add_storyteller_studio;
|
||||
use crate::configs::legacy::{add_legacy_storyteller_stream, add_legacy_trumped, add_legacy_vocodes, add_power_stream};
|
||||
use crate::configs::storyteller::{add_storyteller, add_storyteller_dev_proxy};
|
||||
|
||||
@@ -34,7 +34,7 @@ fn do_build_cors_config(is_production: bool) -> Cors {
|
||||
cors = add_fakeyou_dev_proxy(cors, is_production);
|
||||
cors = add_storyteller(cors, is_production);
|
||||
cors = add_storyteller_dev_proxy(cors, is_production);
|
||||
cors = add_gotta_go_fast_test_branches(cors, is_production);
|
||||
cors = add_storyteller_studio(cors, is_production);
|
||||
|
||||
// Legacy
|
||||
cors = add_legacy_trumped(cors, is_production);
|
||||
|
||||
@@ -24,11 +24,11 @@ errors = { path = "../../lib/errors" }
|
||||
my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# Actix
|
||||
actix-http = "3.4.0"
|
||||
actix-rt = "2.9.0"
|
||||
actix-http = "3.7.0"
|
||||
actix-rt = "2.10.0"
|
||||
actix-service = "2.0.2"
|
||||
actix-utils = "3.0.1"
|
||||
actix-web = "4.4.0"
|
||||
actix-web = "4.7.0"
|
||||
|
||||
# IPv4 and v6 CIDRs (crate has few dependencies)
|
||||
cidr-utils = "0.5.11"
|
||||
|
||||
@@ -32,11 +32,11 @@ my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
# External
|
||||
anyhow = "1.0.86"
|
||||
log = "0.4.14"
|
||||
env_logger = "0.10.1"
|
||||
env_logger = "0.11.3"
|
||||
async-trait = "0.1.75"
|
||||
# The "never-encode-slash" feature seems to have been removed:
|
||||
# https://github.com/durch/rust-s3/pull/254
|
||||
rust-s3 = { version = "0.33.0" }
|
||||
rust-s3 = { version = "0.34.0" }
|
||||
|
||||
# Runtime
|
||||
# NB: We switched to Tokio from `async-std` for broader ecosystem support.
|
||||
|
||||
@@ -15,5 +15,5 @@ my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
# External
|
||||
easyenv = { path = "../../easyenv" }
|
||||
log = "0.4.20"
|
||||
reqwest = "0.11.24"
|
||||
reqwest = "0.12.4"
|
||||
serde_json = "1.0.113"
|
||||
|
||||
@@ -143,9 +143,15 @@ impl ThumbnailTask{
|
||||
"http://media-server.thumbnail-generator/tasks",
|
||||
);
|
||||
|
||||
let basic_auth = easyenv::get_env_string_or_default(
|
||||
"THUMBNAIL_GENERATOR_API_BASIC_AUTH",
|
||||
"",
|
||||
);
|
||||
|
||||
let client = reqwest::Client::new();
|
||||
let task_json = self.request_json();
|
||||
client.post(url)
|
||||
.header("Authorization", "Basic ".to_owned() + &basic_auth)
|
||||
.json(&task_json)
|
||||
.send()
|
||||
.await?
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
[package]
|
||||
name = "twitch_common"
|
||||
edition = "2018"
|
||||
version = "0.0.1"
|
||||
authors = [
|
||||
"Brandon Thomas <bt@brand.io>",
|
||||
"Brandon Thomas <echelon@gmail.com>",
|
||||
]
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
name = "twitch_common"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.cargo-udeps.ignore]
|
||||
normal = ["my-workspace-hack"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
container_common = { path = "../../deprecated/container_common" }
|
||||
easyenv = { path = "../../easyenv" }
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
anyhow = "1.0.86"
|
||||
once_cell = "1.18.0"
|
||||
regex = "1.5.4"
|
||||
|
||||
# Twitch
|
||||
# NB "unsupported" pubsub features may disappear from the Twitch API at any time. It's an unofficial API.
|
||||
# twitch_api2 = { version = "0.6.0-rc.2", features = ["helix", "reqwest_client", "pubsub", "chrono", "unsupported"] }
|
||||
twitch_oauth2 = "0.6.0-rc.2"
|
||||
|
||||
# Serialization
|
||||
serde = "1.0.125"
|
||||
serde_derive = "1.0.125"
|
||||
@@ -1,107 +0,0 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
use regex::Regex;
|
||||
|
||||
// NB: This can be used as a nice, succinct macro with once_cell:
|
||||
//macro_rules! regex {
|
||||
// ($re:literal $(,)?) => {{
|
||||
// static RE: once_cell::sync::OnceCell<regex::Regex> = once_cell::sync::OnceCell::new();
|
||||
// RE.get_or_init(|| regex::Regex::new($re).unwrap())
|
||||
// }};
|
||||
//}
|
||||
|
||||
/// Remove cheermotes from text, eg "this is great Cheer1" -> "this is great"
|
||||
pub fn remove_cheers(text: &str) -> String {
|
||||
let result = TWITCH_CHEER_REGEX.replace_all(text, "");
|
||||
let result = MULTI_SPACE_REGEX.replace_all(&result, " ").to_string();
|
||||
result.trim().to_string()
|
||||
}
|
||||
|
||||
/// These cheer emotes always combine with a number
|
||||
/// This list seems pretty comprehensive
|
||||
/// https://github.com/nossebro/TwitchPubSubMirror/blob/master/TwitchPubSubMirror_StreamlabsSystem.py
|
||||
|
||||
static TWITCH_CHEERS : Lazy<HashSet<String>> = Lazy::new(|| {
|
||||
let cheers = vec![
|
||||
"Cheer",
|
||||
"DoodleCheer",
|
||||
"BibleThump",
|
||||
"cheerwhal",
|
||||
"Corgo",
|
||||
"uni",
|
||||
"ShowLove",
|
||||
"Party",
|
||||
"SeemsGood",
|
||||
"Pride",
|
||||
"Kappa",
|
||||
"FrankerZ",
|
||||
"HeyGuys",
|
||||
"DansGame",
|
||||
"EleGiggle",
|
||||
"TriHard",
|
||||
"Kreygasm",
|
||||
"4Head",
|
||||
"SwiftRage",
|
||||
"NotLikeThis",
|
||||
"FailFish",
|
||||
"VoHiYo",
|
||||
"PJSalt",
|
||||
"MrDestructoid",
|
||||
"bday",
|
||||
"RIPCheer",
|
||||
"Shamrock",
|
||||
"BitBoss",
|
||||
"Streamlabs",
|
||||
"Muxy",
|
||||
"HolidayCheer"
|
||||
];
|
||||
let mut s = HashSet::new();
|
||||
for cheer in cheers.into_iter() {
|
||||
s.insert(cheer.to_string());
|
||||
}
|
||||
s
|
||||
});
|
||||
|
||||
static MULTI_SPACE_REGEX : Lazy<Regex> = Lazy::new(|| {
|
||||
Regex::new("(\\s{2,})").unwrap()
|
||||
});
|
||||
|
||||
static TWITCH_CHEER_REGEX : Lazy<Regex> = Lazy::new(|| {
|
||||
let mut regex_pieces = Vec::new();
|
||||
|
||||
for cheer in TWITCH_CHEERS.iter() {
|
||||
regex_pieces.push(format!("({}\\d+)", cheer));
|
||||
}
|
||||
|
||||
let regex = regex_pieces.join("|");
|
||||
|
||||
// NB: (?i) is case insensitive search
|
||||
// https://docs.rs/regex/1.5.4/regex/#structs
|
||||
let regex = format!("(?i)({})", regex);
|
||||
|
||||
Regex::new(®ex).unwrap()
|
||||
});
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::cheers::remove_cheers;
|
||||
|
||||
#[test]
|
||||
fn test_remove_cheers() {
|
||||
let r = remove_cheers("testing Kappa1 SeemsGood100 removal");
|
||||
assert_eq!(&r, "testing removal");
|
||||
|
||||
let r = remove_cheers("Kappa1 SeemsGood100 no more Cheer1 cheers");
|
||||
assert_eq!(&r, "no more cheers");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_remove_cheers_case_insensitive() {
|
||||
let r = remove_cheers("testing cheer1");
|
||||
assert_eq!(&r, "testing");
|
||||
|
||||
let r = remove_cheers("TESTING CHEER1");
|
||||
assert_eq!(&r, "TESTING");
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
pub mod cheers;
|
||||
pub mod oauth_token_builder;
|
||||
pub mod twitch_secrets;
|
||||
pub mod twitch_user_id;
|
||||
@@ -1,66 +0,0 @@
|
||||
use twitch_oauth2::{ClientId, ClientSecret, Scope};
|
||||
use twitch_oauth2::tokens::UserTokenBuilder;
|
||||
use twitch_oauth2::url::Url;
|
||||
|
||||
/// Get the token builder with the scopes our app needs
|
||||
/// This is used in several places, so centralize creation here.
|
||||
pub fn get_oauth_token_builder(
|
||||
client_id: &str,
|
||||
client_secret: &str,
|
||||
redirect_url: &Url,
|
||||
force_verify: bool
|
||||
) -> UserTokenBuilder {
|
||||
|
||||
let client_id = ClientId::new(client_id);
|
||||
let client_secret = ClientSecret::new(client_secret);
|
||||
|
||||
/*
|
||||
- AnalyticsReadExtensions, scope: "analytics:read:extensions", doc: "View analytics data for the Twitch Extensions owned by the authenticated account.";
|
||||
- AnalyticsReadGames, scope: "analytics:read:games", doc: "View analytics data for the games owned by the authenticated account.";
|
||||
[YES] BitsRead, scope: "bits:read", doc: "View Bits information for a channel.";
|
||||
- ChannelEditCommercial, scope: "channel:edit:commercial", doc: "Run commercials on a channel.";
|
||||
- ChannelManageBroadcast, scope: "channel:manage:broadcast", doc: "Manage a channel’s broadcast configuration, including updating channel configuration and managing stream markers and stream tags.";
|
||||
- ChannelManageExtensions, scope: "channel:manage:extensions", doc: "Manage a channel’s Extension configuration, including activating Extensions.";
|
||||
(?) ChannelManagePolls, scope: "channel:manage:polls", doc: "Manage a channel’s polls.";
|
||||
(?) ChannelManagePredictions, scope: "channel:manage:predictions", doc: "Manage of channel’s Channel Points Predictions";
|
||||
- ChannelManageRedemptions, scope: "channel:manage:redemptions", doc: "Manage Channel Points custom rewards and their redemptions on a channel.";
|
||||
- ChannelManageSchedule, scope: "channel:manage:schedule", doc: "Manage a channel’s stream schedule.";
|
||||
- ChannelManageVideos, scope: "channel:manage:videos", doc: "Manage a channel’s videos, including deleting videos.";
|
||||
- ChannelModerate, scope: "channel:moderate", doc: "Perform moderation actions in a channel. The user requesting the scope must be a moderator in the channel.";
|
||||
- ChannelReadEditors, scope: "channel:read:editors", doc: "View a list of users with the editor role for a channel.";
|
||||
- ChannelReadGoals, scope: "channel:read:goals", doc: "View Creator Goals for a channel.";
|
||||
- ChannelReadHypeTrain, scope: "channel:read:hype_train", doc: "View Hype Train information for a channel.";
|
||||
(?) ChannelReadPolls, scope: "channel:read:polls", doc: "View a channel’s polls.";
|
||||
(?) ChannelReadPredictions, scope: "channel:read:predictions", doc: "View a channel’s Channel Points Predictions.";
|
||||
+ ChannelReadRedemptions, scope: "channel:read:redemptions", doc: "View Channel Points custom rewards and their redemptions on a channel.";
|
||||
- ChannelReadStreamKey, scope: "channel:read:stream_key", doc: "View an authorized user’s stream key.";
|
||||
+ ChannelReadSubscriptions, scope: "channel:read:subscriptions", doc: "View a list of all subscribers to a channel and check if a user is subscribed to a channel.";
|
||||
- ChannelSubscriptions, scope: "channel_subscriptions", doc: "\\[DEPRECATED\\] Read all subscribers to your channel.";
|
||||
[YES] ChatEdit, scope: "chat:edit", doc: "Send live stream chat and rooms messages.";
|
||||
[YES] ChatRead, scope: "chat:read", doc: "View live stream chat and rooms messages.";
|
||||
(?) ClipsEdit, scope: "clips:edit", doc: "Manage Clips for a channel.";
|
||||
(?) ModerationRead, scope: "moderation:read", doc: "View a channel’s moderation data including Moderators, Bans, Timeouts, and Automod settings.";
|
||||
(?) ModeratorManageAutoMod, scope: "moderator:manage:automod", doc: "Manage messages held for review by AutoMod in channels where you are a moderator.";
|
||||
- UserEdit, scope: "user:edit", doc: "Manage a user object.";
|
||||
- UserEditBroadcast, scope: "user:edit:broadcast", doc: "Edit your channel's broadcast configuration, including extension configuration. (This scope implies user:read:broadcast capability.)";
|
||||
- UserEditFollows, scope: "user:edit:follows", doc: "Edit a user’s follows.";
|
||||
- UserManageBlockedUsers, scope: "user:manage:blocked_users", doc: "Manage the block list of a user.";
|
||||
- UserReadBlockedUsers, scope: "user:read:blocked_users", doc: "View the block list of a user.";
|
||||
- UserReadBroadcast, scope: "user:read:broadcast", doc: "View a user’s broadcasting configuration, including Extension configurations.";
|
||||
- UserReadEmail, scope: "user:read:email", doc: "Read an authorized user’s email address.";
|
||||
- UserReadFollows, scope: "user:read:follows", doc: "View the list of channels a user follows.";
|
||||
(?) UserReadSubscriptions, scope: "user:read:subscriptions", doc: "View if an authorized user is subscribed to specific channels.";
|
||||
- WhispersEdit, scope: "whispers:edit", doc: "Send whisper messages.";
|
||||
- WhispersRead, scope: "whispers:read", doc: "View your whisper messages.";
|
||||
*/
|
||||
|
||||
UserTokenBuilder::new(client_id, client_secret, redirect_url.clone())
|
||||
.set_scopes(vec![
|
||||
Scope::BitsRead, // Using bits to cheer (cost money, larger streams)
|
||||
Scope::ChannelReadRedemptions, // Channel points redeemed (free points, smaller streams)
|
||||
Scope::ChannelReadSubscriptions, // List subscribing (paying) users
|
||||
Scope::ChatEdit, // IRC send
|
||||
Scope::ChatRead, // IRC read
|
||||
])
|
||||
.force_verify(force_verify)
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
|
||||
/// Standardized way to read Twitch secrets.
|
||||
/// These are used in several different apps.
|
||||
#[derive(Clone, serde::Deserialize)]
|
||||
pub struct TwitchSecrets {
|
||||
pub app_client_id: String,
|
||||
pub app_client_secret: String,
|
||||
}
|
||||
|
||||
impl TwitchSecrets {
|
||||
pub fn new(
|
||||
app_client_id: &str,
|
||||
app_client_secret: &str,
|
||||
) -> Self {
|
||||
Self {
|
||||
app_client_id: app_client_id.to_string(),
|
||||
app_client_secret: app_client_secret.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_env() -> AnyhowResult<Self> {
|
||||
Ok(Self::new(
|
||||
&easyenv::get_env_string_required("TWITCH_APP_CLIENT_ID")?,
|
||||
&easyenv::get_env_string_required("TWITCH_APP_CLIENT_SECRET")?,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
|
||||
/// Twitch says to encode these as strings, but the Twitch Rust libraries
|
||||
/// still deal in integers (uh oh). This centralizes type juggling.
|
||||
#[derive(Clone)]
|
||||
pub struct TwitchUserId {
|
||||
string_user_id: String,
|
||||
numeric_user_id: u32,
|
||||
}
|
||||
|
||||
impl TwitchUserId {
|
||||
|
||||
pub fn from_str(twitch_user_id: &str) -> AnyhowResult<Self> {
|
||||
let numeric_id = twitch_user_id.parse::<u32>()?;
|
||||
Ok(Self {
|
||||
string_user_id: twitch_user_id.to_string(),
|
||||
numeric_user_id: numeric_id,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn from_numeric(twitch_user_id: u32) -> Self {
|
||||
Self {
|
||||
string_user_id: twitch_user_id.to_string(),
|
||||
numeric_user_id: twitch_user_id,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_numeric(&self) -> u32 {
|
||||
self.numeric_user_id
|
||||
}
|
||||
|
||||
pub fn get_str(&self) -> &str {
|
||||
&self.string_user_id
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
dotenv = "0.15.0"
|
||||
hostname = "0.3.1"
|
||||
hostname = "0.4.0"
|
||||
log = "0.4.14"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -24,9 +24,9 @@ errors = { path = "../errors" }
|
||||
my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
hmac = "0.10.0" # jwt signing
|
||||
hmac = "0.10.1" # jwt signing
|
||||
jwt = "0.13.0"
|
||||
sha2 = "0.9.5" # hmac signing
|
||||
sha2 = "0.9.9" # hmac signing
|
||||
|
||||
[dev-dependencies]
|
||||
# None yet
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
|
||||
//pub type LazyOptional = Box<dyn Fn() -> Option<bool> + Send>;
|
||||
pub type LazyOptional<'a> = Box<dyn Fn() -> Option<bool> + 'a>;
|
||||
|
||||
/// Lazily evaluate a list of boxed closures that return Option<bool>.
|
||||
///
|
||||
/// - If any result in true, return Some(true).
|
||||
/// The first true will end the evaluation.
|
||||
///
|
||||
/// - If none are true, but any result in false, return Some(false).
|
||||
///
|
||||
/// - Else, return None
|
||||
pub fn lazy_any_option_true(functions: &[LazyOptional]) -> Option<bool>
|
||||
{
|
||||
let mut opt_false_found = false;
|
||||
for func in functions.iter() {
|
||||
match func() {
|
||||
Some(true) => return Some(true),
|
||||
Some(false) => if !opt_false_found { opt_false_found = true },
|
||||
None => continue,
|
||||
}
|
||||
}
|
||||
if opt_false_found {
|
||||
Some(false)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
#[test]
|
||||
fn empty() {
|
||||
let result = super::lazy_any_option_true(&[]);
|
||||
assert_eq!(result, None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_empty() {
|
||||
let result = super::lazy_any_option_true(&[
|
||||
Box::new(|| None),
|
||||
Box::new(|| None),
|
||||
]);
|
||||
assert_eq!(result, None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_false() {
|
||||
let result = super::lazy_any_option_true(&[
|
||||
Box::new(|| Some(false)),
|
||||
Box::new(|| Some(false)),
|
||||
]);
|
||||
assert_eq!(result, Some(false));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mix_false_none() {
|
||||
let result = super::lazy_any_option_true(&[
|
||||
Box::new(|| None),
|
||||
Box::new(|| Some(false)),
|
||||
Box::new(|| Some(false)),
|
||||
Box::new(|| None),
|
||||
]);
|
||||
assert_eq!(result, Some(false));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mix() {
|
||||
let result = super::lazy_any_option_true(&[
|
||||
Box::new(|| None),
|
||||
Box::new(|| Some(false)),
|
||||
Box::new(|| Some(true)),
|
||||
Box::new(|| Some(false)),
|
||||
Box::new(|| None),
|
||||
]);
|
||||
assert_eq!(result, Some(true));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mix_closure_capture() {
|
||||
let truthy = Some(true);
|
||||
let falsy = Some(true);
|
||||
|
||||
let result = super::lazy_any_option_true(&[
|
||||
Box::new(|| None),
|
||||
Box::new(|| (&falsy).map(|inner| inner.clone())),
|
||||
Box::new(|| (&truthy).map(|inner| inner.clone())),
|
||||
Box::new(|| (&falsy).map(|inner| inner.clone())),
|
||||
Box::new(|| None),
|
||||
]);
|
||||
assert_eq!(result, Some(true));
|
||||
}
|
||||
}
|
||||
@@ -18,5 +18,8 @@
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
pub mod lazy_any_option_true;
|
||||
pub mod str_to_bool;
|
||||
pub mod traits;
|
||||
pub mod trim_or_empty;
|
||||
pub mod try_str_to_num;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
pub mod trim_or_emptyable;
|
||||
@@ -0,0 +1,131 @@
|
||||
/// Something that can be trimmed
|
||||
pub trait TrimOrEmptyable {
|
||||
/// Trim the string. If it trims to empty, return None.
|
||||
fn trim_or_empty(&self) -> Option<&str>;
|
||||
|
||||
/// Trim the string. If it trims to empty, return None.
|
||||
fn new_string_trim_or_empty(&self) -> Option<String> {
|
||||
self.trim_or_empty().map(|s| s.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Can't create this due to conflicting implementations
|
||||
// impl<T> TrimOrEmptyable for T
|
||||
// where T: AsRef<str>
|
||||
// {
|
||||
// fn trim_or_empty(&self) -> Option<&str> {
|
||||
// self.as_ref().trim_or_empty()
|
||||
// }
|
||||
// }
|
||||
|
||||
impl TrimOrEmptyable for Option<&str> {
|
||||
fn trim_or_empty(&self) -> Option<&str> {
|
||||
self.map(|s| s.trim())
|
||||
.filter(|s| !s.is_empty())
|
||||
}
|
||||
}
|
||||
|
||||
impl TrimOrEmptyable for Option<String> {
|
||||
fn trim_or_empty(&self) -> Option<&str> {
|
||||
self.as_deref()
|
||||
.map(|s| s.trim())
|
||||
.filter(|s| !s.is_empty())
|
||||
}
|
||||
}
|
||||
|
||||
impl TrimOrEmptyable for &str {
|
||||
fn trim_or_empty(&self) -> Option<&str> {
|
||||
match self.trim() {
|
||||
"" => None,
|
||||
s => Some(s),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl TrimOrEmptyable for String {
|
||||
fn trim_or_empty(&self) -> Option<&str> {
|
||||
match self.trim() {
|
||||
"" => None,
|
||||
s => Some(s),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::traits::trim_or_emptyable::TrimOrEmptyable;
|
||||
|
||||
mod str_primitive {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn empty() {
|
||||
assert_eq!("".trim_or_empty(), None);
|
||||
assert_eq!(" ".trim_or_empty(), None);
|
||||
assert_eq!(" \n\t \t ".trim_or_empty(), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn trimmed() {
|
||||
assert_eq!("hello".trim_or_empty(), Some("hello"));
|
||||
assert_eq!(" world ".trim_or_empty(), Some("world"));
|
||||
assert_eq!(" \n\tsuper\nmario\tbros\n\t \n ".trim_or_empty(), Some("super\nmario\tbros"));
|
||||
}
|
||||
}
|
||||
|
||||
mod string_primitive {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn empty() {
|
||||
assert_eq!("".to_string().trim_or_empty(), None);
|
||||
assert_eq!(" ".to_string().trim_or_empty(), None);
|
||||
assert_eq!(" \n\t \t ".to_string().trim_or_empty(), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn trimmed() {
|
||||
assert_eq!("hello".to_string().trim_or_empty(), Some("hello"));
|
||||
assert_eq!(" world ".to_string().trim_or_empty(), Some("world"));
|
||||
assert_eq!(" \n\tsuper\nmario\tbros\n\t \n ".to_string().trim_or_empty(), Some("super\nmario\tbros"));
|
||||
}
|
||||
}
|
||||
|
||||
mod option_str_primitive {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn empty() {
|
||||
assert_eq!(Some("").trim_or_empty(), None);
|
||||
assert_eq!(Some(" ").trim_or_empty(), None);
|
||||
assert_eq!(Some(" \n\t \t ").trim_or_empty(), None);
|
||||
assert_eq!(None::<&str>.trim_or_empty(), None);
|
||||
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn trimmed() {
|
||||
assert_eq!(Some("hello").trim_or_empty(), Some("hello"));
|
||||
assert_eq!(Some(" world ").trim_or_empty(), Some("world"));
|
||||
assert_eq!(Some(" \n\tsuper\nmario\tbros\n\t \n ").trim_or_empty(), Some("super\nmario\tbros"));
|
||||
}
|
||||
}
|
||||
|
||||
mod option_string_primitive {
|
||||
use super::*;
|
||||
#[test]
|
||||
fn empty() {
|
||||
assert_eq!(Some("".to_string()).trim_or_empty(), None);
|
||||
assert_eq!(Some(" ".to_string()).trim_or_empty(), None);
|
||||
assert_eq!(Some(" \n\t \t ".to_string()).trim_or_empty(), None);
|
||||
assert_eq!(None::<String>.trim_or_empty(), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn trimmed() {
|
||||
assert_eq!(Some("hello".to_string()).trim_or_empty(), Some("hello"));
|
||||
assert_eq!(Some(" world ".to_string()).trim_or_empty(), Some("world"));
|
||||
assert_eq!(Some(" \n\tsuper\nmario\tbros\n\t \n ".to_string()).trim_or_empty(), Some("super\nmario\tbros"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
/// Trim the string. If it trims to empty, return None.
|
||||
pub fn trim_or_empty(input: &str) -> Option<&str> {
|
||||
let trimmed = input.trim();
|
||||
if trimmed.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(trimmed)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::trim_or_empty::trim_or_empty;
|
||||
|
||||
#[test]
|
||||
fn empty() {
|
||||
assert_eq!(trim_or_empty(""), None);
|
||||
assert_eq!(trim_or_empty(" "), None);
|
||||
assert_eq!(trim_or_empty(" \n\t \t "), None);
|
||||
}
|
||||
|
||||
fn trimmed() {
|
||||
assert_eq!(trim_or_empty("hello"), Some("hello"));
|
||||
assert_eq!(trim_or_empty(" world "), Some("world"));
|
||||
assert_eq!(trim_or_empty(" \n\tsuper\nmario\tbros\n\t \n "), Some("super\nmario\tbros"));
|
||||
}
|
||||
}
|
||||
@@ -21,14 +21,14 @@ normal = ["my-workspace-hack"]
|
||||
anyhow = "1.0.86"
|
||||
once_cell = "1.18.0"
|
||||
rand = "0.8.5"
|
||||
uuid = { version = "0.8.2", features = ["v4"] }
|
||||
uuid = { version = "1.8.0", features = ["v4"] }
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
# Serialization
|
||||
serde = { version = "1.0.125", features = ["derive"] }
|
||||
toml = "0.5.8"
|
||||
toml = "0.8.14"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
pub mod random_crockford_token;
|
||||
pub mod random_uuid;
|
||||
pub mod random_crockford_token;
|
||||
@@ -1,9 +0,0 @@
|
||||
use uuid::Uuid;
|
||||
|
||||
pub fn generate_random_uuid() -> String {
|
||||
let uuid = Uuid::new_v4();
|
||||
let mut buffer = Uuid::encode_buffer();
|
||||
let hyphenated_uuid = uuid.to_hyphenated()
|
||||
.encode_lower(&mut buffer);
|
||||
hyphenated_uuid.to_string()
|
||||
}
|
||||
@@ -25,14 +25,14 @@ my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
anyhow = "1.0.86"
|
||||
base64 = "0.21.0"
|
||||
base64 = "0.22.1"
|
||||
log = "0.4.14"
|
||||
once_cell = "1.18.0"
|
||||
regex = "1.5.4"
|
||||
|
||||
# Web
|
||||
actix-http = "3.4.0"
|
||||
actix-web = "4.4.0"
|
||||
actix-http = "3.7.0"
|
||||
actix-web = "4.7.0"
|
||||
|
||||
# Language
|
||||
language-tags = "0.3.2" # Parsing single tags richly
|
||||
@@ -44,4 +44,4 @@ serde_derive = "1.0.125"
|
||||
serde_json = "1.0.108"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-rt = "2.9.0"
|
||||
actix-rt = "2.10.0"
|
||||
|
||||
@@ -24,7 +24,7 @@ my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
dotenv = "0.15.0"
|
||||
env_logger = "0.10.1"
|
||||
env_logger = "0.11.3"
|
||||
log = "0.4.14"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -26,7 +26,7 @@ my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
# External
|
||||
bcrypt = "0.15" # password hashes
|
||||
data-encoding = "2.3.2"
|
||||
md-5 = "0.9.1" # DO NOT USE FOR SERIOUS CRYPTO (we use this for gravatar)
|
||||
md-5 = "0.10.6" # DO NOT USE FOR SERIOUS CRYPTO (we use this for gravatar)
|
||||
ring = "0.17.0-alpha.10"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -21,7 +21,7 @@ normal = ["my-workspace-hack"]
|
||||
my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
infer = "0.15.0" # Mimetype detection
|
||||
infer = "0.16.0" # Mimetype detection
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -31,3 +31,23 @@ pub fn ffprobe_get_dimensions(
|
||||
})),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use testing::test_file_path::test_file_path;
|
||||
|
||||
use crate::ffprobe_get_dimensions::ffprobe_get_dimensions;
|
||||
|
||||
#[test]
|
||||
pub fn test_decode_mp4() {
|
||||
let filename = test_file_path("test_data/video/mp4/golden_sun_garoh.mp4")
|
||||
.expect("path should exist");
|
||||
|
||||
let info = ffprobe_get_dimensions(filename)
|
||||
.expect("should be able to read with ffprobe")
|
||||
.expect("dimensions should not be empty");
|
||||
|
||||
assert_eq!(info.width, 640);
|
||||
assert_eq!(info.height, 480);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ normal = ["my-workspace-hack"]
|
||||
my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
uuid = { version = "0.8.2", features = ["v4"] }
|
||||
uuid = { version = "1.8.0", features = ["v4"] }
|
||||
|
||||
[dev-dependencies]
|
||||
# None yet
|
||||
|
||||
@@ -4,7 +4,7 @@ use uuid::Uuid;
|
||||
pub fn generate_random_uuid() -> String {
|
||||
let uuid = Uuid::new_v4();
|
||||
let mut buffer = Uuid::encode_buffer();
|
||||
let hyphenated_uuid = uuid.to_hyphenated()
|
||||
let hyphenated_uuid = uuid.hyphenated()
|
||||
.encode_lower(&mut buffer);
|
||||
hyphenated_uuid.to_string()
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ normal = ["my-workspace-hack"]
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
container_common = { path = "../deprecated/container_common" }
|
||||
errors = { path = "../errors" }
|
||||
redis_common = { path = "../redis_common" }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use errors::AnyhowResult;
|
||||
|
||||
pub trait JobProgressReporterBuilder {
|
||||
// NB: Still learning "Box<dyn Trait>" vs "impl Trait";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use errors::AnyhowResult;
|
||||
|
||||
use crate::job_progress_reporter::job_progress_reporter::{JobProgressReporter, JobProgressReporterBuilder};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ use r2d2_redis::{r2d2, RedisConnectionManager};
|
||||
use r2d2_redis::r2d2::PooledConnection;
|
||||
use r2d2_redis::redis::Commands;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use errors::AnyhowResult;
|
||||
use redis_common::redis_keys::RedisKeys;
|
||||
|
||||
use crate::job_progress_reporter::job_progress_reporter::{JobProgressReporter, JobProgressReporterBuilder};
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::time::Instant;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use chrono::{DateTime, Utc};
|
||||
|
||||
use errors::AnyhowResult;
|
||||
|
||||
@@ -17,6 +19,14 @@ struct JobStatsInner {
|
||||
pub total_failure_count: u64,
|
||||
pub consecutive_success_count: u64,
|
||||
pub consecutive_failure_count: u64,
|
||||
|
||||
pub maybe_current_job: Option<JobDetailInner>,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct JobDetailInner {
|
||||
pub job_token: String,
|
||||
pub job_started_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
/// Public result type.
|
||||
@@ -26,6 +36,16 @@ pub struct SuccessAndFailureStats {
|
||||
pub total_failure_count: u64,
|
||||
pub consecutive_success_count: u64,
|
||||
pub consecutive_failure_count: u64,
|
||||
|
||||
pub maybe_current_job: Option<JobDetail>,
|
||||
}
|
||||
|
||||
|
||||
/// Public result type.
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct JobDetail {
|
||||
pub job_token: String,
|
||||
pub job_started_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
impl JobStats {
|
||||
@@ -45,6 +65,12 @@ impl JobStats {
|
||||
total_failure_count: lock.total_failure_count,
|
||||
consecutive_success_count: lock.consecutive_success_count,
|
||||
consecutive_failure_count: lock.consecutive_failure_count,
|
||||
maybe_current_job: lock.maybe_current_job.as_ref().map(|job| {
|
||||
JobDetail {
|
||||
job_token: job.job_token.clone(),
|
||||
job_started_at: job.job_started_at,
|
||||
}
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -62,6 +88,12 @@ impl JobStats {
|
||||
total_failure_count: lock.total_failure_count,
|
||||
consecutive_success_count: lock.consecutive_success_count,
|
||||
consecutive_failure_count: lock.consecutive_failure_count,
|
||||
maybe_current_job: lock.maybe_current_job.as_ref().map(|job| {
|
||||
JobDetail {
|
||||
job_token: job.job_token.clone(),
|
||||
job_started_at: job.job_started_at,
|
||||
}
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -79,6 +111,43 @@ impl JobStats {
|
||||
total_failure_count: lock.total_failure_count,
|
||||
consecutive_success_count: lock.consecutive_success_count,
|
||||
consecutive_failure_count: lock.consecutive_failure_count,
|
||||
maybe_current_job: lock.maybe_current_job.as_ref().map(|job| {
|
||||
JobDetail {
|
||||
job_token: job.job_token.clone(),
|
||||
job_started_at: job.job_started_at,
|
||||
}
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn record_job_start(&self, job_token: &str) -> AnyhowResult<SuccessAndFailureStats> {
|
||||
// NB: lock errors can't be moved between threads, so we change their type
|
||||
let mut lock = self.inner.write()
|
||||
.map_err(|e| anyhow!("lock error: {:?}", e))?;
|
||||
|
||||
Ok(SuccessAndFailureStats {
|
||||
total_success_count: lock.total_success_count,
|
||||
total_failure_count: lock.total_failure_count,
|
||||
consecutive_success_count: lock.consecutive_success_count,
|
||||
consecutive_failure_count: lock.consecutive_failure_count,
|
||||
maybe_current_job: Some(JobDetail {
|
||||
job_token: job_token.to_string(),
|
||||
job_started_at: Utc::now(),
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn record_job_end(&self) -> AnyhowResult<SuccessAndFailureStats> {
|
||||
// NB: lock errors can't be moved between threads, so we change their type
|
||||
let mut lock = self.inner.write()
|
||||
.map_err(|e| anyhow!("lock error: {:?}", e))?;
|
||||
|
||||
Ok(SuccessAndFailureStats {
|
||||
total_success_count: lock.total_success_count,
|
||||
total_failure_count: lock.total_failure_count,
|
||||
consecutive_success_count: lock.consecutive_success_count,
|
||||
consecutive_failure_count: lock.consecutive_failure_count,
|
||||
maybe_current_job: None,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ use r2d2_redis::r2d2::PooledConnection;
|
||||
use r2d2_redis::redis::Commands;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use errors::AnyhowResult;
|
||||
use redis_common::redis_keys::RedisKeys;
|
||||
|
||||
#[deprecated(note="Use JobProgressReporterBuilder")]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use errors::AnyhowResult;
|
||||
|
||||
/// These are for files on the worker filesystems
|
||||
pub struct SemiPersistentCacheDir {
|
||||
|
||||
@@ -24,7 +24,7 @@ normal = ["my-workspace-hack"]
|
||||
my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
env_logger = "0.10.1"
|
||||
env_logger = "0.11.3"
|
||||
log = "0.4.20"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -25,7 +25,7 @@ my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
once_cell = "1.18.0"
|
||||
pulldown-cmark = "0.9.3" # markdown
|
||||
pulldown-cmark = "0.11.0" # markdown
|
||||
regex = "1.10.4"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -35,7 +35,7 @@ once_cell = "1.18.0"
|
||||
serde = "1.0.125"
|
||||
serde_derive = "1.0.125"
|
||||
serde_json = "1.0.108"
|
||||
toml = "0.5.8"
|
||||
toml = "0.8.14"
|
||||
|
||||
# Runtime + Clients
|
||||
tokio = { version = "1.34.0", features = ["full"] }
|
||||
|
||||
@@ -21,9 +21,9 @@ normal = ["my-workspace-hack"]
|
||||
buckets = { path = "../../_types/buckets" }
|
||||
composite_identifiers = { path = "../../_types/composite_identifiers" }
|
||||
config = { path = "../deprecated/config" }
|
||||
container_common = { path = "../deprecated/container_common" }
|
||||
enums = { path = "../../_types/enums" }
|
||||
errors = { path = "../errors" }
|
||||
idempotency = { path = "../idempotency" }
|
||||
reusable_types = { path = "../../_types/reusable_types" }
|
||||
tokens = { path = "../../_types/tokens" }
|
||||
|
||||
@@ -44,8 +44,8 @@ regex = "1.5.4"
|
||||
serde = "1.0.125"
|
||||
serde_derive = "1.0.125"
|
||||
serde_json = "1.0.108"
|
||||
toml = "0.5.8"
|
||||
serial_test = "2.0.0"
|
||||
toml = "0.8.14"
|
||||
serial_test = "3.0.0"
|
||||
|
||||
tokio = { version = "1.34.0", features = ["full"] }
|
||||
rand = "0.8"
|
||||
|
||||
@@ -123,6 +123,13 @@ pub struct WorkflowArgs {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub negative_prompt: Option<String>,
|
||||
|
||||
// Optional global IP Adapter image media file token
|
||||
// This will apply to the entire workflow / video
|
||||
#[serde(rename = "gi")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub global_ip_adapter_token: Option<MediaFileToken>,
|
||||
|
||||
#[deprecated(note = "Use `lipsync_enabled` instead")]
|
||||
#[serde(rename = "el")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub enable_lipsync: Option<bool>,
|
||||
@@ -132,6 +139,7 @@ pub struct WorkflowArgs {
|
||||
pub remove_watermark: Option<bool>,
|
||||
|
||||
// TODO(bt,2024-05-13): This is a temporary rollout flag to enable us to do Python-side mapping of job args
|
||||
#[deprecated(note = "This has been rolled out and is effectively dead.")]
|
||||
#[serde(rename = "pa")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub rollout_python_workflow_args: Option<bool>,
|
||||
@@ -158,6 +166,14 @@ pub struct WorkflowArgs {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub lipsync_enabled: Option<bool>,
|
||||
|
||||
#[serde(rename = "dl")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub disable_lcm: Option<bool>,
|
||||
|
||||
#[serde(rename = "uc")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub use_cinematic: Option<bool>,
|
||||
|
||||
#[serde(rename = "s")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub strength: Option<f32>,
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
use chrono::Duration;
|
||||
use enums::no_table::style_transfer::style_transfer_name::StyleTransferName;
|
||||
use errors::AnyhowResult;
|
||||
use tokens::tokens::media_files::MediaFileToken;
|
||||
|
||||
use crate::payloads::prompt_args::encoded_style_transfer_name::EncodedStyleTransferName;
|
||||
|
||||
// TODO(bt,2024-04-13): Once this gets big enough, design a PromptInnerPayloadBuilder that returns None if no fields were set.
|
||||
|
||||
pub struct PromptInnerPayloadBuilder {
|
||||
pub style_name: Option<EncodedStyleTransferName>,
|
||||
pub used_face_detailer: Option<bool>,
|
||||
pub used_upscaler: Option<bool>,
|
||||
pub strength: Option<f32>,
|
||||
pub inference_duration: Option<Duration>,
|
||||
}
|
||||
|
||||
/// Used to encode extra state for the `prompts` table in the `maybe_other_args` column.
|
||||
/// This should act somewhat like a serialized protobuf stored inside a record.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
@@ -34,6 +27,11 @@ pub struct PromptInnerPayload {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub used_upscaler: Option<bool>,
|
||||
|
||||
#[serde(rename = "le")] // NB: DO NOT CHANGE: IT WILL BREAK MYSQL RECORDS. Renamed to consume fewer bytes.
|
||||
#[serde(alias = "lipsync_enabled")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub lipsync_enabled: Option<bool>,
|
||||
|
||||
#[serde(rename = "st")] // NB: DO NOT CHANGE: IT WILL BREAK MYSQL RECORDS. Renamed to consume fewer bytes.
|
||||
#[serde(alias = "strength")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@@ -43,6 +41,52 @@ pub struct PromptInnerPayload {
|
||||
#[serde(alias = "inference_duration")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub inference_duration_millis: Option<u64>,
|
||||
|
||||
#[serde(rename = "wip")] // NB: DO NOT CHANGE: IT WILL BREAK MYSQL RECORDS. Renamed to consume fewer bytes.
|
||||
#[serde(alias = "main_ipa_workflow")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub main_ipa_workflow: Option<String>,
|
||||
|
||||
#[serde(rename = "wfd")] // NB: DO NOT CHANGE: IT WILL BREAK MYSQL RECORDS. Renamed to consume fewer bytes.
|
||||
#[serde(alias = "face_detailer_workflow")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub face_detailer_workflow: Option<String>,
|
||||
|
||||
#[serde(rename = "wu")] // NB: DO NOT CHANGE: IT WILL BREAK MYSQL RECORDS. Renamed to consume fewer bytes.
|
||||
#[serde(alias = "upscaler_workflow")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub upscaler_workflow: Option<String>,
|
||||
|
||||
#[serde(rename = "dl")] // NB: DO NOT CHANGE: IT WILL BREAK MYSQL RECORDS. Renamed to consume fewer bytes.
|
||||
#[serde(alias = "disable_lcm")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub disable_lcm: Option<bool>,
|
||||
|
||||
#[serde(rename = "uc")] // NB: DO NOT CHANGE: IT WILL BREAK MYSQL RECORDS. Renamed to consume fewer bytes.
|
||||
#[serde(alias = "use_cinematic")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub use_cinematic: Option<bool>,
|
||||
|
||||
/// Global IP Adapter image token, if set.
|
||||
#[serde(rename = "gi")] // NB: DO NOT CHANGE: IT WILL BREAK MYSQL RECORDS. Renamed to consume fewer bytes.
|
||||
#[serde(alias = "global_ipa_token")]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub global_ipa_token: Option<MediaFileToken>,
|
||||
}
|
||||
|
||||
pub struct PromptInnerPayloadBuilder {
|
||||
pub style_name: Option<EncodedStyleTransferName>,
|
||||
pub used_face_detailer: Option<bool>,
|
||||
pub used_upscaler: Option<bool>,
|
||||
pub lipsync_enabled: Option<bool>,
|
||||
pub disable_lcm: Option<bool>,
|
||||
pub use_cinematic: Option<bool>,
|
||||
pub strength: Option<f32>,
|
||||
pub inference_duration: Option<Duration>,
|
||||
pub main_ipa_workflow: Option<String>,
|
||||
pub face_detailer_workflow: Option<String>,
|
||||
pub upscaler_workflow: Option<String>,
|
||||
pub global_ipa_token: Option<MediaFileToken>,
|
||||
}
|
||||
|
||||
impl PromptInnerPayloadBuilder {
|
||||
@@ -51,8 +95,15 @@ impl PromptInnerPayloadBuilder {
|
||||
style_name: None,
|
||||
used_face_detailer: None,
|
||||
used_upscaler: None,
|
||||
lipsync_enabled: None,
|
||||
disable_lcm: None,
|
||||
use_cinematic: None,
|
||||
strength: None,
|
||||
inference_duration: None,
|
||||
main_ipa_workflow: None,
|
||||
face_detailer_workflow: None,
|
||||
upscaler_workflow: None,
|
||||
global_ipa_token: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,8 +111,15 @@ impl PromptInnerPayloadBuilder {
|
||||
if self.style_name.is_none()
|
||||
&& self.used_face_detailer.is_none()
|
||||
&& self.used_upscaler.is_none()
|
||||
&& self.lipsync_enabled.is_none()
|
||||
&& self.disable_lcm.is_none()
|
||||
&& self.use_cinematic.is_none()
|
||||
&& self.strength.is_none()
|
||||
&& self.inference_duration.is_none()
|
||||
&& self.main_ipa_workflow.is_none()
|
||||
&& self.face_detailer_workflow.is_none()
|
||||
&& self.upscaler_workflow.is_none()
|
||||
&& self.global_ipa_token.is_none()
|
||||
{
|
||||
return None;
|
||||
}
|
||||
@@ -70,11 +128,18 @@ impl PromptInnerPayloadBuilder {
|
||||
style_name: self.style_name,
|
||||
used_face_detailer: self.used_face_detailer,
|
||||
used_upscaler: self.used_upscaler,
|
||||
lipsync_enabled: self.lipsync_enabled,
|
||||
disable_lcm: self.disable_lcm,
|
||||
use_cinematic: self.use_cinematic,
|
||||
strength: self.strength,
|
||||
inference_duration_millis: self.inference_duration
|
||||
.map(|duration| duration.num_milliseconds()
|
||||
.max(0)
|
||||
.unsigned_abs()), // NB: Why does chrono return i64 ? That's crazy!
|
||||
main_ipa_workflow: self.main_ipa_workflow,
|
||||
face_detailer_workflow: self.face_detailer_workflow,
|
||||
upscaler_workflow: self.upscaler_workflow,
|
||||
global_ipa_token: self.global_ipa_token,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -98,6 +163,30 @@ impl PromptInnerPayloadBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_lipsync_enabled(&mut self, enabled: bool) {
|
||||
if enabled {
|
||||
self.lipsync_enabled = Some(true);
|
||||
} else {
|
||||
self.lipsync_enabled = None;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_disable_lcm(&mut self, enabled: bool) {
|
||||
if enabled {
|
||||
self.disable_lcm = Some(true);
|
||||
} else {
|
||||
self.disable_lcm = None;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_use_cinematic(&mut self, enabled: bool) {
|
||||
if enabled {
|
||||
self.use_cinematic = Some(true);
|
||||
} else {
|
||||
self.use_cinematic = None;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_strength(&mut self, strength: Option<f32>) {
|
||||
self.strength = strength;
|
||||
}
|
||||
@@ -105,6 +194,22 @@ impl PromptInnerPayloadBuilder {
|
||||
pub fn set_inference_duration(&mut self, duration: Option<Duration>) {
|
||||
self.inference_duration = duration;
|
||||
}
|
||||
|
||||
pub fn set_main_ipa_workflow(&mut self, workflow: Option<String>) {
|
||||
self.main_ipa_workflow = workflow;
|
||||
}
|
||||
|
||||
pub fn set_face_detailer_workflow(&mut self, workflow: Option<String>) {
|
||||
self.face_detailer_workflow = workflow;
|
||||
}
|
||||
|
||||
pub fn set_upscaler_workflow(&mut self, workflow: Option<String>) {
|
||||
self.upscaler_workflow = workflow;
|
||||
}
|
||||
|
||||
pub fn set_global_ipa_token(&mut self, token: Option<MediaFileToken>) {
|
||||
self.global_ipa_token = token;
|
||||
}
|
||||
}
|
||||
|
||||
impl PromptInnerPayload{
|
||||
@@ -116,4 +221,3 @@ impl PromptInnerPayload{
|
||||
Ok(serde_json::to_string(self)?)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,9 +47,16 @@ pub struct BetaKeyListItem {
|
||||
pub maybe_redeemed_at: Option<DateTime<Utc>>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum FilterToKeys {
|
||||
All,
|
||||
Redeemed,
|
||||
Unredeemed,
|
||||
}
|
||||
|
||||
pub struct ListBetaKeysArgs<'a> {
|
||||
pub filter_to_referrer_user_token: Option<&'a UserToken>,
|
||||
pub filter_to_remaining_keys: bool,
|
||||
pub filter_to_keys: FilterToKeys,
|
||||
|
||||
pub page_size: usize,
|
||||
pub page_index: usize,
|
||||
@@ -65,7 +72,7 @@ pub async fn list_beta_keys(args: ListBetaKeysArgs<'_>) -> AnyhowResult<BetaKeyL
|
||||
let mut count_query_builder = query_builder(
|
||||
count_fields,
|
||||
args.filter_to_referrer_user_token,
|
||||
args.filter_to_remaining_keys,
|
||||
args.filter_to_keys,
|
||||
false,
|
||||
args.page_index,
|
||||
args.page_size,
|
||||
@@ -85,7 +92,7 @@ pub async fn list_beta_keys(args: ListBetaKeysArgs<'_>) -> AnyhowResult<BetaKeyL
|
||||
let mut query = query_builder(
|
||||
result_fields,
|
||||
args.filter_to_referrer_user_token,
|
||||
args.filter_to_remaining_keys,
|
||||
args.filter_to_keys,
|
||||
true,
|
||||
args.page_index,
|
||||
args.page_size,
|
||||
@@ -172,7 +179,7 @@ fn query_builder<'a>(
|
||||
select_fields: &'a str,
|
||||
|
||||
filter_to_referrer_user_token: Option<&'a UserToken>,
|
||||
filter_to_remaining_keys: bool,
|
||||
filter_to_keys: FilterToKeys,
|
||||
|
||||
enforce_limits: bool,
|
||||
page_index: usize,
|
||||
@@ -215,15 +222,22 @@ LEFT OUTER JOIN users AS redeemer
|
||||
query_builder.push_bind(user_token.as_str());
|
||||
}
|
||||
|
||||
if filter_to_remaining_keys {
|
||||
if !first_predicate_added {
|
||||
query_builder.push(" WHERE ");
|
||||
first_predicate_added = true;
|
||||
} else {
|
||||
query_builder.push(" AND ");
|
||||
}
|
||||
match filter_to_keys {
|
||||
FilterToKeys::All => {} // No-op
|
||||
FilterToKeys::Redeemed | FilterToKeys::Unredeemed => {
|
||||
if !first_predicate_added {
|
||||
query_builder.push(" WHERE ");
|
||||
first_predicate_added = true;
|
||||
} else {
|
||||
query_builder.push(" AND ");
|
||||
}
|
||||
|
||||
query_builder.push(" b.maybe_redeemed_at IS NULL ");
|
||||
if filter_to_keys == FilterToKeys::Redeemed {
|
||||
query_builder.push(" b.maybe_redeemed_at IS NOT NULL ");
|
||||
} else {
|
||||
query_builder.push(" b.maybe_redeemed_at IS NULL ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if let Some(offset) = maybe_offset {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
pub mod _keys;
|
||||
pub mod list_available_generic_inference_jobs;
|
||||
pub mod mark_generic_inference_job_cancelled_by_user;
|
||||
pub mod mark_generic_inference_job_completely_failed;
|
||||
pub mod mark_generic_inference_job_failure;
|
||||
pub mod mark_generic_inference_job_pending_and_grab_lock;
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
use anyhow::anyhow;
|
||||
use sqlx;
|
||||
use sqlx::MySql;
|
||||
use sqlx::pool::PoolConnection;
|
||||
|
||||
use errors::AnyhowResult;
|
||||
use tokens::tokens::users::UserToken;
|
||||
|
||||
/// Mark finished jobs as dismissed by the user.
|
||||
pub async fn dismiss_finished_jobs_for_user(
|
||||
mysql_connection: &mut PoolConnection<MySql>,
|
||||
user_token: &UserToken
|
||||
) -> AnyhowResult<()> {
|
||||
let query_result = sqlx::query!(
|
||||
r#"
|
||||
UPDATE generic_inference_jobs
|
||||
SET
|
||||
is_dismissed_by_user = TRUE
|
||||
WHERE maybe_creator_user_token = ?
|
||||
AND status IN (
|
||||
'dead',
|
||||
'cancelled_by_system',
|
||||
'cancelled_by_user',
|
||||
'complete_failure',
|
||||
'complete_success'
|
||||
)
|
||||
AND created_at > DATE_SUB(NOW(), INTERVAL 36 HOUR)
|
||||
LIMIT 1000
|
||||
"#,
|
||||
user_token,
|
||||
)
|
||||
.execute(&mut **mysql_connection)
|
||||
.await;
|
||||
|
||||
if let Err(err) = query_result {
|
||||
return Err(anyhow!("error with dismiss jobs query: {:?}", err));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
pub mod batch_get_inference_job_status;
|
||||
pub mod dismiss_finished_jobs_for_user;
|
||||
pub mod get_inference_job_status;
|
||||
pub mod get_pending_inference_job_count;
|
||||
pub mod insert_generic_inference_job;
|
||||
pub mod kill_generic_inference_jobs;
|
||||
pub mod list_session_jobs;
|
||||
pub mod mark_generic_inference_job_cancelled_by_user;
|
||||
@@ -38,7 +38,9 @@ pub struct MediaFile {
|
||||
|
||||
pub maybe_media_subtype: Option<MediaFileSubtype>,
|
||||
|
||||
// TODO: Other media details (file size, mime type, dimensions, duration, etc.)
|
||||
pub maybe_mime_type: Option<String>,
|
||||
|
||||
// TODO: Other media details (file size, dimensions, duration, etc.)
|
||||
// TODO: Provenance data (product, upload vs inference, model details and foreign keys)
|
||||
|
||||
pub maybe_batch_token: Option<BatchGenerationToken>,
|
||||
@@ -124,6 +126,8 @@ pub struct MediaFileRaw {
|
||||
|
||||
pub maybe_media_subtype: Option<MediaFileSubtype>,
|
||||
|
||||
pub maybe_mime_type: Option<String>,
|
||||
|
||||
pub maybe_batch_token: Option<BatchGenerationToken>,
|
||||
|
||||
pub maybe_style_transfer_source_media_file_token: Option<MediaFileToken>,
|
||||
@@ -220,6 +224,7 @@ pub async fn get_media_file(
|
||||
maybe_animation_type: record.maybe_animation_type,
|
||||
media_class: record.media_class,
|
||||
maybe_media_subtype: record.maybe_media_subtype,
|
||||
maybe_mime_type: record.maybe_mime_type,
|
||||
maybe_batch_token: record.maybe_batch_token,
|
||||
maybe_style_transfer_source_media_file_token: record.maybe_style_transfer_source_media_file_token,
|
||||
maybe_scene_source_media_file_token: record.maybe_scene_source_media_file_token,
|
||||
@@ -279,6 +284,8 @@ SELECT
|
||||
|
||||
m.maybe_media_subtype as `maybe_media_subtype: enums::by_table::media_files::media_file_subtype::MediaFileSubtype`,
|
||||
|
||||
m.maybe_mime_type,
|
||||
|
||||
users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,
|
||||
users.username as maybe_creator_username,
|
||||
users.display_name as maybe_creator_display_name,
|
||||
@@ -381,6 +388,8 @@ SELECT
|
||||
|
||||
m.maybe_media_subtype as `maybe_media_subtype: enums::by_table::media_files::media_file_subtype::MediaFileSubtype`,
|
||||
|
||||
m.maybe_mime_type,
|
||||
|
||||
users.token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,
|
||||
users.username as maybe_creator_username,
|
||||
users.display_name as maybe_creator_display_name,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
use log::warn;
|
||||
use sqlx::MySqlPool;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use enums::by_table::model_weights::{
|
||||
weights_category::WeightsCategory,
|
||||
weights_types::WeightsType,
|
||||
};
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::AnyhowResult;
|
||||
use tokens::tokens::{model_weights::ModelWeightToken, users::UserToken};
|
||||
use tokens::tokens::media_files::MediaFileToken;
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ use log::error;
|
||||
use sqlx::{MySql, MySqlPool};
|
||||
use sqlx::pool::PoolConnection;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use enums::by_table::model_weights::weights_category::WeightsCategory;
|
||||
use enums::by_table::model_weights::weights_types::WeightsType;
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::AnyhowResult;
|
||||
use tokens::tokens::{model_weights::ModelWeightToken, users::UserToken};
|
||||
|
||||
// Notes ensure that Enums have sqlx::Type
|
||||
|
||||
+1
-1
@@ -4,10 +4,10 @@ use log::error;
|
||||
use sqlx::{MySql, MySqlPool};
|
||||
use sqlx::pool::PoolConnection;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use enums::by_table::model_weights::weights_category::WeightsCategory;
|
||||
use enums::by_table::model_weights::weights_types::WeightsType;
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::AnyhowResult;
|
||||
use tokens::tokens::{model_weights::ModelWeightToken, users::UserToken};
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
|
||||
+1
-1
@@ -4,10 +4,10 @@ use log::error;
|
||||
use sqlx::{MySql, MySqlPool};
|
||||
use sqlx::pool::PoolConnection;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use enums::by_table::model_weights::weights_category::WeightsCategory;
|
||||
use enums::by_table::model_weights::weights_types::WeightsType;
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::AnyhowResult;
|
||||
use tokens::tokens::{model_weights::ModelWeightToken, users::UserToken};
|
||||
|
||||
use crate::column_types::vocoder_type::VocoderType;
|
||||
|
||||
@@ -9,7 +9,6 @@ mod tests {
|
||||
use tokio;
|
||||
|
||||
use config::shared_constants::DEFAULT_MYSQL_CONNECTION_STRING;
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
// common tests
|
||||
use enums::by_table::model_weights::{
|
||||
weights_category::WeightsCategory,
|
||||
@@ -17,6 +16,7 @@ mod tests {
|
||||
};
|
||||
use enums::common::view_as::ViewAs;
|
||||
use enums::common::visibility::Visibility;
|
||||
use errors::AnyhowResult;
|
||||
use tokens::tokens::{model_weights::ModelWeightToken, users::UserToken};
|
||||
|
||||
use crate::queries::model_weights::create::create_weight::create_weight;
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
use anyhow::anyhow;
|
||||
use sqlx::MySqlPool;
|
||||
|
||||
use container_common::token::random_uuid::generate_random_uuid;
|
||||
use errors::AnyhowResult;
|
||||
use idempotency::uuid::generate_random_uuid;
|
||||
|
||||
use crate::builders::RequiredOption;
|
||||
|
||||
|
||||
@@ -26,4 +26,4 @@ my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
# (None yet)
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = "2.0.0"
|
||||
serial_test = "3.0.0"
|
||||
|
||||
@@ -18,7 +18,7 @@ normal = ["my-workspace-hack"]
|
||||
[dependencies]
|
||||
|
||||
# Internal
|
||||
container_common = { path = "../deprecated/container_common" }
|
||||
errors = { path = "../errors" }
|
||||
user_input_common = { path = "../user_input_common" }
|
||||
|
||||
# Workspace hack (faster compile times)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use anyhow::anyhow;
|
||||
|
||||
use container_common::anyhow_result::AnyhowResult;
|
||||
use errors::AnyhowResult;
|
||||
|
||||
/// Text Pipelines for TTS
|
||||
/// The system only tolerates the following values for TTS text pipelines.
|
||||
|
||||
@@ -25,5 +25,5 @@ reusable_types = { path = "../../_types/reusable_types" }
|
||||
my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
actix-web = "4.4.0"
|
||||
actix-web = "4.7.0"
|
||||
anyhow = "1.0.86"
|
||||
|
||||
@@ -21,6 +21,6 @@ my-workspace-hack = { version = "0.1", path = "../../my-workspace-hack" }
|
||||
|
||||
# External
|
||||
once_cell = "1.18.0"
|
||||
pulldown-cmark = "0.9.3" # Markdown
|
||||
pulldown-cmark = "0.11.0" # Markdown
|
||||
regex = "1.5.4"
|
||||
unicode-segmentation = "1.10.1"
|
||||
|
||||
@@ -28,7 +28,7 @@ bytes = "1.6"
|
||||
chrono = { version = "0.4.22", features = ["serde"] }
|
||||
log = "0.4.14"
|
||||
once_cell = "1.18.0"
|
||||
strum = { version = "0.25", features = ["derive"] } # Fancy enum iteration, etc.
|
||||
strum = { version = "0.26", features = ["derive"] } # Fancy enum iteration, etc.
|
||||
|
||||
# Serialization
|
||||
serde = "1.0.125"
|
||||
@@ -36,7 +36,7 @@ serde_derive = "1.0.125"
|
||||
serde_json = "1.0.108"
|
||||
|
||||
# HTTP
|
||||
reqwest = { version = "0.11", features = ["json"] } # HTTP Client
|
||||
reqwest = { version = "0.12", features = ["json"] } # HTTP Client
|
||||
|
||||
# Scraping
|
||||
rss = "2.0.2"
|
||||
|
||||
@@ -14,183 +14,203 @@ publish = false
|
||||
|
||||
### BEGIN HAKARI SECTION
|
||||
[dependencies]
|
||||
actix-rt = { version = "2.9.0" }
|
||||
actix-router = { version = "0.5.3" }
|
||||
actix-rt = { version = "2.10.0" }
|
||||
ahash = { version = "0.8.11" }
|
||||
base64 = { version = "0.21.5" }
|
||||
anstream = { version = "0.6.14" }
|
||||
arrayvec = { version = "0.7.4", features = ["serde"] }
|
||||
base64 = { version = "0.21.7" }
|
||||
base64ct = { version = "1.6.0", default-features = false, features = ["alloc"] }
|
||||
bitflags = { version = "2.4.1", default-features = false, features = ["serde", "std"] }
|
||||
bitflags = { version = "2.5.0", default-features = false, features = ["serde", "std"] }
|
||||
block-buffer = { version = "0.9.0", default-features = false, features = ["block-padding"] }
|
||||
bytemuck = { version = "1.16.0", default-features = false, features = ["extern_crate_alloc"] }
|
||||
byteorder = { version = "1.5.0" }
|
||||
chrono = { version = "0.4.31", features = ["alloc", "serde"] }
|
||||
clap = { version = "4.4.8", features = ["derive"] }
|
||||
combine = { version = "4.6.6", default-features = false, features = ["std", "tokio"] }
|
||||
crossbeam-utils = { version = "0.8.19" }
|
||||
crossbeam-utils = { version = "0.8.20" }
|
||||
crypto-common = { version = "0.1.6", default-features = false, features = ["std"] }
|
||||
deranged = { version = "0.3.9", default-features = false, features = ["powerfmt", "serde", "std"] }
|
||||
deranged = { version = "0.3.11", default-features = false, features = ["powerfmt", "serde", "std"] }
|
||||
digest = { version = "0.10.7", features = ["mac", "oid", "std"] }
|
||||
either = { version = "1.9.0", features = ["serde"] }
|
||||
flate2 = { version = "1.0.28" }
|
||||
either = { version = "1.12.0", features = ["serde"] }
|
||||
flate2 = { version = "1.0.30" }
|
||||
flume = { version = "0.11.0", default-features = false, features = ["async"] }
|
||||
futures = { version = "0.3.29", features = ["thread-pool"] }
|
||||
futures-channel = { version = "0.3.29", features = ["sink"] }
|
||||
futures-core = { version = "0.3.29" }
|
||||
futures-executor = { version = "0.3.29", features = ["thread-pool"] }
|
||||
futures-io = { version = "0.3.29" }
|
||||
futures-sink = { version = "0.3.29" }
|
||||
futures-task = { version = "0.3.29", default-features = false, features = ["std"] }
|
||||
futures-util = { version = "0.3.29", features = ["channel", "io", "sink"] }
|
||||
futures-channel = { version = "0.3.30", features = ["sink"] }
|
||||
futures-core = { version = "0.3.30" }
|
||||
futures-executor = { version = "0.3.30", features = ["thread-pool"] }
|
||||
futures-io = { version = "0.3.30" }
|
||||
futures-sink = { version = "0.3.30" }
|
||||
futures-task = { version = "0.3.30", default-features = false, features = ["std"] }
|
||||
futures-util = { version = "0.3.30", features = ["channel", "io", "sink"] }
|
||||
generic-array = { version = "0.14.7", default-features = false, features = ["more_lengths"] }
|
||||
getrandom = { version = "0.2.11", default-features = false, features = ["std"] }
|
||||
hashbrown-582f2526e08bb6a0 = { package = "hashbrown", version = "0.14.5", features = ["raw"] }
|
||||
hashbrown-5ef9efb8ec2df382 = { package = "hashbrown", version = "0.12.3", features = ["raw"] }
|
||||
getrandom = { version = "0.2.14", default-features = false, features = ["std"] }
|
||||
hashbrown = { version = "0.14.5", features = ["raw"] }
|
||||
hmac = { version = "0.12.1", default-features = false, features = ["reset"] }
|
||||
hyper = { version = "0.14.27", features = ["full"] }
|
||||
indexmap = { version = "2.2.3", features = ["serde"] }
|
||||
itertools = { version = "0.10.5" }
|
||||
hyper-582f2526e08bb6a0 = { package = "hyper", version = "0.14.28", features = ["full"] }
|
||||
indexmap = { version = "2.2.6", features = ["serde"] }
|
||||
itertools = { version = "0.12.1" }
|
||||
lazy_static = { version = "1.4.0", default-features = false, features = ["spin_no_std"] }
|
||||
libc = { version = "0.2.150", features = ["extra_traits"] }
|
||||
log = { version = "0.4.20", default-features = false, features = ["std"] }
|
||||
memchr = { version = "2.6.4", features = ["use_std"] }
|
||||
miniz_oxide = { version = "0.7.1", features = ["simd"] }
|
||||
libc = { version = "0.2.155", features = ["extra_traits"] }
|
||||
log = { version = "0.4.21", default-features = false, features = ["std"] }
|
||||
md-5 = { version = "0.10.6" }
|
||||
memchr = { version = "2.7.4", features = ["use_std"] }
|
||||
miniz_oxide = { version = "0.7.2", features = ["simd"] }
|
||||
mio = { version = "0.8.11", features = ["net", "os-ext"] }
|
||||
native-tls = { version = "0.2.11", default-features = false, features = ["vendored"] }
|
||||
num-bigint = { version = "0.4.4" }
|
||||
num-integer = { version = "0.1.45", default-features = false, features = ["i128", "std"] }
|
||||
num-iter = { version = "0.1.43", default-features = false, features = ["i128", "std"] }
|
||||
num-rational = { version = "0.4.1", features = ["serde"] }
|
||||
num-traits = { version = "0.2.17", features = ["i128", "libm"] }
|
||||
proc-macro2 = { version = "1.0.78", features = ["span-locations"] }
|
||||
pulldown-cmark = { version = "0.9.3" }
|
||||
quote = { version = "1.0.35" }
|
||||
num-traits = { version = "0.2.19", features = ["i128", "libm"] }
|
||||
proc-macro2 = { version = "1.0.85", features = ["span-locations"] }
|
||||
quick-xml = { version = "0.30.0", features = ["encoding", "serialize"] }
|
||||
quote = { version = "1.0.36" }
|
||||
rand = { version = "0.8.5", features = ["small_rng"] }
|
||||
rand_chacha = { version = "0.3.1" }
|
||||
rand_core = { version = "0.6.4", default-features = false, features = ["std"] }
|
||||
regex = { version = "1.10.2" }
|
||||
regex-automata = { version = "0.4.3", default-features = false, features = ["dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "unicode"] }
|
||||
regex-syntax = { version = "0.8.2" }
|
||||
reqwest = { version = "0.11.24", features = ["blocking", "gzip", "json", "native-tls", "stream"] }
|
||||
serde = { version = "1.0.196", features = ["alloc", "derive", "rc"] }
|
||||
serde_json = { version = "1.0.113", features = ["preserve_order", "raw_value"] }
|
||||
regex = { version = "1.10.5" }
|
||||
regex-automata = { version = "0.4.7", default-features = false, features = ["dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "unicode"] }
|
||||
regex-syntax = { version = "0.8.4" }
|
||||
reqwest = { version = "0.12.4", features = ["blocking", "json", "rustls-tls"] }
|
||||
semver = { version = "1.0.23", features = ["serde"] }
|
||||
serde = { version = "1.0.203", features = ["alloc", "derive", "rc"] }
|
||||
serde_json = { version = "1.0.117", features = ["preserve_order", "raw_value"] }
|
||||
sha1 = { version = "0.10.6" }
|
||||
sha2 = { version = "0.10.8" }
|
||||
simd-adler32 = { version = "0.3.7" }
|
||||
socket2 = { version = "0.5.5", default-features = false, features = ["all"] }
|
||||
smallvec = { version = "1.13.2", default-features = false, features = ["const_new"] }
|
||||
socket2 = { version = "0.5.7", default-features = false, features = ["all"] }
|
||||
sqlx = { version = "0.7.3", features = ["chrono", "mysql", "runtime-tokio-native-tls", "sqlite", "tls-rustls"] }
|
||||
sqlx-core = { version = "0.7.3", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls", "any", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-mysql = { version = "0.7.3", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-sqlite = { version = "0.7.3", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.49", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
|
||||
time = { version = "0.3.30", features = ["macros", "serde-well-known"] }
|
||||
tokio = { version = "1.34.0", features = ["full"] }
|
||||
stable_deref_trait = { version = "1.2.0" }
|
||||
syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.66", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
|
||||
time = { version = "0.3.36", features = ["macros", "serde-well-known"] }
|
||||
tokio = { version = "1.37.0", features = ["full"] }
|
||||
tokio-stream = { version = "0.1.15", features = ["fs"] }
|
||||
tracing = { version = "0.1.40", features = ["log"] }
|
||||
twitch_oauth2 = { version = "0.6.1", features = ["reqwest_client"] }
|
||||
unicode-bidi = { version = "0.3.13" }
|
||||
unicode-normalization = { version = "0.1.22" }
|
||||
url = { version = "2.5.0", features = ["serde"] }
|
||||
unicode-bidi = { version = "0.3.15" }
|
||||
unicode-normalization = { version = "0.1.23" }
|
||||
url = { version = "2.5.1", features = ["serde"] }
|
||||
uuid = { version = "1.8.0", features = ["v4"] }
|
||||
void = { version = "1.0.2" }
|
||||
zip = { version = "0.6.6" }
|
||||
|
||||
[build-dependencies]
|
||||
actix-router = { version = "0.5.3" }
|
||||
ahash = { version = "0.8.11" }
|
||||
base64 = { version = "0.21.5" }
|
||||
base64 = { version = "0.21.7" }
|
||||
base64ct = { version = "1.6.0", default-features = false, features = ["alloc"] }
|
||||
bitflags = { version = "2.4.1", default-features = false, features = ["serde", "std"] }
|
||||
bitflags = { version = "2.5.0", default-features = false, features = ["serde", "std"] }
|
||||
byteorder = { version = "1.5.0" }
|
||||
cc = { version = "1.0.83", default-features = false, features = ["parallel"] }
|
||||
cc = { version = "1.0.99", default-features = false, features = ["parallel"] }
|
||||
chrono = { version = "0.4.31", features = ["alloc", "serde"] }
|
||||
crossbeam-utils = { version = "0.8.19" }
|
||||
crossbeam-utils = { version = "0.8.20" }
|
||||
crypto-common = { version = "0.1.6", default-features = false, features = ["std"] }
|
||||
deranged = { version = "0.3.9", default-features = false, features = ["powerfmt", "serde", "std"] }
|
||||
derive_more = { version = "0.99.17", features = ["nightly"] }
|
||||
digest = { version = "0.10.7", features = ["mac", "oid", "std"] }
|
||||
either = { version = "1.9.0", features = ["serde"] }
|
||||
flate2 = { version = "1.0.28" }
|
||||
either = { version = "1.12.0", features = ["serde"] }
|
||||
flate2 = { version = "1.0.30" }
|
||||
flume = { version = "0.11.0", default-features = false, features = ["async"] }
|
||||
futures-channel = { version = "0.3.29", features = ["sink"] }
|
||||
futures-core = { version = "0.3.29" }
|
||||
futures-executor = { version = "0.3.29", features = ["thread-pool"] }
|
||||
futures-io = { version = "0.3.29" }
|
||||
futures-sink = { version = "0.3.29" }
|
||||
futures-task = { version = "0.3.29", default-features = false, features = ["std"] }
|
||||
futures-util = { version = "0.3.29", features = ["channel", "io", "sink"] }
|
||||
futures-channel = { version = "0.3.30", features = ["sink"] }
|
||||
futures-core = { version = "0.3.30" }
|
||||
futures-executor = { version = "0.3.30", features = ["thread-pool"] }
|
||||
futures-io = { version = "0.3.30" }
|
||||
futures-sink = { version = "0.3.30" }
|
||||
futures-task = { version = "0.3.30", default-features = false, features = ["std"] }
|
||||
futures-util = { version = "0.3.30", features = ["channel", "io", "sink"] }
|
||||
generic-array = { version = "0.14.7", default-features = false, features = ["more_lengths"] }
|
||||
getrandom = { version = "0.2.11", default-features = false, features = ["std"] }
|
||||
hashbrown-582f2526e08bb6a0 = { package = "hashbrown", version = "0.14.5", features = ["raw"] }
|
||||
getrandom = { version = "0.2.14", default-features = false, features = ["std"] }
|
||||
hashbrown = { version = "0.14.5", features = ["raw"] }
|
||||
heck = { version = "0.4.1", features = ["unicode"] }
|
||||
hmac = { version = "0.12.1", default-features = false, features = ["reset"] }
|
||||
indexmap = { version = "2.2.3", features = ["serde"] }
|
||||
itertools = { version = "0.10.5" }
|
||||
indexmap = { version = "2.2.6", features = ["serde"] }
|
||||
itertools = { version = "0.12.1" }
|
||||
lazy_static = { version = "1.4.0", default-features = false, features = ["spin_no_std"] }
|
||||
libc = { version = "0.2.150", features = ["extra_traits"] }
|
||||
log = { version = "0.4.20", default-features = false, features = ["std"] }
|
||||
memchr = { version = "2.6.4", features = ["use_std"] }
|
||||
miniz_oxide = { version = "0.7.1", features = ["simd"] }
|
||||
log = { version = "0.4.21", default-features = false, features = ["std"] }
|
||||
md-5 = { version = "0.10.6" }
|
||||
memchr = { version = "2.7.4", features = ["use_std"] }
|
||||
miniz_oxide = { version = "0.7.2", features = ["simd"] }
|
||||
mio = { version = "0.8.11", features = ["net", "os-ext"] }
|
||||
native-tls = { version = "0.2.11", default-features = false, features = ["vendored"] }
|
||||
num-integer = { version = "0.1.45", default-features = false, features = ["i128", "std"] }
|
||||
num-iter = { version = "0.1.43", default-features = false, features = ["i128", "std"] }
|
||||
num-traits = { version = "0.2.17", features = ["i128", "libm"] }
|
||||
proc-macro2 = { version = "1.0.78", features = ["span-locations"] }
|
||||
quote = { version = "1.0.35" }
|
||||
num-traits = { version = "0.2.19", features = ["i128", "libm"] }
|
||||
proc-macro2 = { version = "1.0.85", features = ["span-locations"] }
|
||||
quote = { version = "1.0.36" }
|
||||
rand = { version = "0.8.5", features = ["small_rng"] }
|
||||
rand_chacha = { version = "0.3.1" }
|
||||
rand_core = { version = "0.6.4", default-features = false, features = ["std"] }
|
||||
regex = { version = "1.10.2" }
|
||||
regex-automata = { version = "0.4.3", default-features = false, features = ["dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "unicode"] }
|
||||
regex-syntax = { version = "0.8.2" }
|
||||
serde = { version = "1.0.196", features = ["alloc", "derive", "rc"] }
|
||||
serde_json = { version = "1.0.113", features = ["preserve_order", "raw_value"] }
|
||||
regex = { version = "1.10.5" }
|
||||
regex-automata = { version = "0.4.7", default-features = false, features = ["dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "unicode"] }
|
||||
regex-syntax = { version = "0.8.4" }
|
||||
semver = { version = "1.0.23", features = ["serde"] }
|
||||
serde = { version = "1.0.203", features = ["alloc", "derive", "rc"] }
|
||||
serde_json = { version = "1.0.117", features = ["preserve_order", "raw_value"] }
|
||||
sha1 = { version = "0.10.6" }
|
||||
sha2 = { version = "0.10.8" }
|
||||
simd-adler32 = { version = "0.3.7" }
|
||||
smallvec = { version = "1.13.2", default-features = false, features = ["const_new"] }
|
||||
sqlx-core = { version = "0.7.3", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls", "any", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-macros = { version = "0.7.3", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls", "chrono", "json", "migrate", "mysql", "sqlite"] }
|
||||
sqlx-macros-core = { version = "0.7.3", features = ["_rt-tokio", "_tls-native-tls", "_tls-rustls", "chrono", "json", "migrate", "mysql", "sqlite"] }
|
||||
sqlx-mysql = { version = "0.7.3", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
sqlx-sqlite = { version = "0.7.3", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
|
||||
stable_deref_trait = { version = "1.2.0" }
|
||||
syn-dff4ba8e3ae991db = { package = "syn", version = "1.0.109", features = ["extra-traits", "fold", "full", "visit-mut"] }
|
||||
syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.49", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
|
||||
time = { version = "0.3.30", features = ["macros", "serde-well-known"] }
|
||||
time-macros = { version = "0.2.15", default-features = false, features = ["formatting", "parsing", "serde"] }
|
||||
tokio = { version = "1.34.0", features = ["full"] }
|
||||
syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.66", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }
|
||||
time-macros = { version = "0.2.18", default-features = false, features = ["formatting", "parsing", "serde"] }
|
||||
tokio = { version = "1.37.0", features = ["full"] }
|
||||
tokio-stream = { version = "0.1.15", features = ["fs"] }
|
||||
tracing = { version = "0.1.40", features = ["log"] }
|
||||
unicode-bidi = { version = "0.3.13" }
|
||||
unicode-normalization = { version = "0.1.22" }
|
||||
url = { version = "2.5.0", features = ["serde"] }
|
||||
zip = { version = "0.6.6" }
|
||||
unicode-bidi = { version = "0.3.15" }
|
||||
unicode-normalization = { version = "0.1.23" }
|
||||
url = { version = "2.5.1", features = ["serde"] }
|
||||
|
||||
[target.x86_64-unknown-linux-gnu.dependencies]
|
||||
openssl = { version = "0.10.60", features = ["vendored"] }
|
||||
openssl-sys = { version = "0.9.96", default-features = false, features = ["vendored"] }
|
||||
rustix = { version = "0.38.26", features = ["fs", "termios"] }
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.3.1", features = ["client", "http1", "http2"] }
|
||||
openssl = { version = "0.10.64", features = ["vendored"] }
|
||||
openssl-sys = { version = "0.9.102", default-features = false, features = ["vendored"] }
|
||||
rustls-pki-types = { version = "1.7.0", features = ["std"] }
|
||||
spin = { version = "0.9.8" }
|
||||
tower = { version = "0.4.13", default-features = false, features = ["balance", "buffer", "limit", "timeout", "util"] }
|
||||
|
||||
[target.x86_64-unknown-linux-gnu.build-dependencies]
|
||||
openssl = { version = "0.10.60", features = ["vendored"] }
|
||||
openssl-sys = { version = "0.9.96", default-features = false, features = ["vendored"] }
|
||||
rustix = { version = "0.38.26", features = ["fs", "termios"] }
|
||||
socket2 = { version = "0.5.5", default-features = false, features = ["all"] }
|
||||
libc = { version = "0.2.155", features = ["extra_traits"] }
|
||||
openssl = { version = "0.10.64", features = ["vendored"] }
|
||||
openssl-sys = { version = "0.9.102", default-features = false, features = ["vendored"] }
|
||||
socket2 = { version = "0.5.7", default-features = false, features = ["all"] }
|
||||
spin = { version = "0.9.8" }
|
||||
|
||||
[target.x86_64-apple-darwin.dependencies]
|
||||
rustix = { version = "0.38.26", features = ["fs", "termios"] }
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.3.1", features = ["client", "http1", "http2"] }
|
||||
rustls-pki-types = { version = "1.7.0", features = ["std"] }
|
||||
spin = { version = "0.9.8" }
|
||||
tower = { version = "0.4.13", default-features = false, features = ["balance", "buffer", "limit", "timeout", "util"] }
|
||||
|
||||
[target.x86_64-apple-darwin.build-dependencies]
|
||||
rustix = { version = "0.38.26", features = ["fs", "termios"] }
|
||||
socket2 = { version = "0.5.5", default-features = false, features = ["all"] }
|
||||
libc = { version = "0.2.155", features = ["extra_traits"] }
|
||||
socket2 = { version = "0.5.7", default-features = false, features = ["all"] }
|
||||
spin = { version = "0.9.8" }
|
||||
|
||||
[target.x86_64-pc-windows-msvc.dependencies]
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.3.1", features = ["client", "http1", "http2"] }
|
||||
rustls-pki-types = { version = "1.7.0", features = ["std"] }
|
||||
spin = { version = "0.9.8" }
|
||||
winapi = { version = "0.3.9", default-features = false, features = ["consoleapi", "errhandlingapi", "fibersapi", "fileapi", "handleapi", "knownfolders", "memoryapi", "minwinbase", "minwindef", "namedpipeapi", "ntdef", "ntsecapi", "ntstatus", "objbase", "processenv", "processthreadsapi", "profileapi", "shlobj", "std", "synchapi", "sysinfoapi", "timezoneapi", "winbase", "wincon", "winerror", "winnt", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip", "wtypesbase"] }
|
||||
windows-sys = { version = "0.52.0", features = ["Win32_Foundation", "Win32_Networking_WinSock", "Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Memory", "Win32_System_Pipes", "Win32_System_Registry", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Time", "Win32_System_WindowsProgramming"] }
|
||||
tower = { version = "0.4.13", default-features = false, features = ["balance", "buffer", "limit", "timeout", "util"] }
|
||||
winapi = { version = "0.3.9", default-features = false, features = ["consoleapi", "errhandlingapi", "fibersapi", "fileapi", "handleapi", "memoryapi", "minwindef", "namedpipeapi", "ntsecapi", "ntstatus", "processenv", "processthreadsapi", "profileapi", "std", "synchapi", "sysinfoapi", "winbase", "wincon", "winerror", "winnt", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip"] }
|
||||
windows-sys-b21d60becc0929df = { package = "windows-sys", version = "0.52.0", features = ["Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Memory", "Win32_System_Threading", "Win32_System_WindowsProgramming"] }
|
||||
windows-sys-c8eced492e86ede7 = { package = "windows-sys", version = "0.48.0", features = ["Win32_Foundation", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Pipes", "Win32_System_Registry", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Time", "Win32_System_WindowsProgramming", "Win32_UI_Shell"] }
|
||||
|
||||
[target.x86_64-pc-windows-msvc.build-dependencies]
|
||||
socket2 = { version = "0.5.5", default-features = false, features = ["all"] }
|
||||
hyper-dff4ba8e3ae991db = { package = "hyper", version = "1.3.1", features = ["client", "http1", "http2"] }
|
||||
reqwest = { version = "0.12.4", features = ["blocking", "json", "rustls-tls"] }
|
||||
rustls-pki-types = { version = "1.7.0", features = ["std"] }
|
||||
socket2 = { version = "0.5.7", default-features = false, features = ["all"] }
|
||||
spin = { version = "0.9.8" }
|
||||
winapi = { version = "0.3.9", default-features = false, features = ["consoleapi", "errhandlingapi", "fibersapi", "fileapi", "handleapi", "knownfolders", "memoryapi", "minwinbase", "minwindef", "namedpipeapi", "ntdef", "ntsecapi", "ntstatus", "objbase", "processenv", "processthreadsapi", "profileapi", "shlobj", "std", "synchapi", "sysinfoapi", "timezoneapi", "winbase", "wincon", "winerror", "winnt", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip", "wtypesbase"] }
|
||||
windows-sys = { version = "0.52.0", features = ["Win32_Foundation", "Win32_Networking_WinSock", "Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Memory", "Win32_System_Pipes", "Win32_System_Registry", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Time", "Win32_System_WindowsProgramming"] }
|
||||
tower = { version = "0.4.13", default-features = false, features = ["balance", "buffer", "limit", "timeout", "util"] }
|
||||
winapi = { version = "0.3.9", default-features = false, features = ["consoleapi", "errhandlingapi", "fibersapi", "fileapi", "handleapi", "memoryapi", "minwindef", "namedpipeapi", "ntsecapi", "ntstatus", "processenv", "processthreadsapi", "profileapi", "std", "synchapi", "sysinfoapi", "winbase", "wincon", "winerror", "winnt", "winsock2", "ws2def", "ws2ipdef", "ws2tcpip"] }
|
||||
windows-sys-b21d60becc0929df = { package = "windows-sys", version = "0.52.0", features = ["Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_Networking_WinSock", "Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Memory", "Win32_System_Threading", "Win32_System_WindowsProgramming"] }
|
||||
windows-sys-c8eced492e86ede7 = { package = "windows-sys", version = "0.48.0", features = ["Win32_Foundation", "Win32_Networking_WinSock", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_Pipes", "Win32_System_Registry", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Time", "Win32_System_WindowsProgramming", "Win32_UI_Shell"] }
|
||||
|
||||
### END HAKARI SECTION
|
||||
|
||||
@@ -19,7 +19,6 @@ normal = ["my-workspace-hack"]
|
||||
|
||||
# Internal
|
||||
config = { path = "../../../lib/deprecated/config" }
|
||||
container_common = { path = "../../../lib/deprecated/container_common" }
|
||||
easyenv = { path = "../../../lib/easyenv" }
|
||||
enums = { path = "../../../_types/enums" }
|
||||
errors = { path = "../../../lib/errors" }
|
||||
@@ -34,7 +33,7 @@ my-workspace-hack = { version = "0.1", path = "../../../my-workspace-hack" }
|
||||
anyhow = "1.0.86"
|
||||
chrono = { version = "0.4.22", features = ["serde"] }
|
||||
dotenv = "0.15.0"
|
||||
hostname = "0.3.1"
|
||||
hostname = "0.4.0"
|
||||
log = "0.4.14"
|
||||
rand = "0.8.5"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user