mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-30 05:22:51 -04:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b500a10b95 |
@@ -12,7 +12,6 @@ db.secrets
|
||||
db_secrets.toml
|
||||
env-secrets
|
||||
production_database_secret_connect.sh
|
||||
script/production_database_secret_connect.sh
|
||||
production_database_secret_query.sh
|
||||
production_database_voice_clone_report_download.sh
|
||||
secrets.toml
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nUPDATE users\nSET\n can_access_studio = ?,\n version = version + 1\n\nWHERE users.token = ?\nLIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "19c1458e12d614bfface303102898b6a34f6b7a56eb906f5df3568172d51778b"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\n UPDATE media_files\n SET\n creator_set_visibility = ?\n WHERE token = ?\n LIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "3ce0af2b4111883eeba5621cd1f5b6bbae8de275b5e738550b56db2b630ce8d3"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nUPDATE beta_keys\nSET\n maybe_notes = ?\nWHERE\n token = ?\nLIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "533ec8cc98a690f9e24809905f5b341dc5d62534508ff428cd8051ed1aa3ff66"
|
||||
}
|
||||
+3
-14
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nSELECT\n jobs.token as `job_token: tokens::tokens::generic_inference_jobs::InferenceJobToken`,\n\n jobs.status as `status: enums::common::job_status_plus::JobStatusPlus`,\n jobs.attempt_count,\n\n jobs.maybe_creator_user_token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n jobs.maybe_creator_anonymous_visitor_token as `maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken`,\n jobs.creator_ip_address,\n\n jobs.inference_category as `inference_category: enums::by_table::generic_inference_jobs::inference_category::InferenceCategory`,\n jobs.maybe_model_type,\n jobs.maybe_model_token,\n jobs.maybe_raw_inference_text,\n jobs.maybe_inference_args,\n\n jobs.frontend_failure_category as `maybe_frontend_failure_category: enums::by_table::generic_inference_jobs::frontend_failure_category::FrontendFailureCategory`,\n\n jobs.on_success_result_entity_type as maybe_result_entity_type,\n jobs.on_success_result_entity_token as maybe_result_entity_token,\n\n model_weights.title as maybe_model_weights_title,\n tts_models.title as maybe_tts_model_title,\n voice_conversion_models.title as maybe_voice_conversion_model_title,\n\n tts_results.public_bucket_wav_audio_path as maybe_tts_public_bucket_path,\n voice_conversion_results.public_bucket_hash as maybe_voice_conversion_public_bucket_hash,\n\n media_files.public_bucket_directory_hash as maybe_media_file_public_bucket_directory_hash,\n media_files.maybe_public_bucket_prefix as maybe_media_file_public_bucket_prefix,\n media_files.maybe_public_bucket_extension as maybe_media_file_public_bucket_extension,\n\n jobs.assigned_worker as maybe_assigned_worker,\n jobs.assigned_cluster as maybe_assigned_cluster,\n\n jobs.is_keepalive_required,\n\n jobs.created_at,\n jobs.updated_at,\n\n jobs.first_started_at as maybe_first_started_at,\n jobs.successfully_completed_at as maybe_successfully_completed_at,\n\n NOW() as database_clock\n\nFROM generic_inference_jobs as jobs\n\nLEFT OUTER JOIN model_weights ON jobs.maybe_model_token = model_weights.token\nLEFT OUTER JOIN tts_models ON jobs.maybe_model_token = tts_models.token\nLEFT OUTER JOIN voice_conversion_models ON jobs.maybe_model_token = voice_conversion_models.token\n\nLEFT OUTER JOIN tts_results ON jobs.on_success_result_entity_token = tts_results.token\nLEFT OUTER JOIN voice_conversion_results ON jobs.on_success_result_entity_token = voice_conversion_results.token\nLEFT OUTER JOIN media_files ON jobs.on_success_result_entity_token = media_files.token\n\nWHERE jobs.token = ?\n ",
|
||||
"query": "\nSELECT\n jobs.token as `job_token: tokens::tokens::generic_inference_jobs::InferenceJobToken`,\n\n jobs.status as `status: enums::common::job_status_plus::JobStatusPlus`,\n jobs.attempt_count,\n\n jobs.maybe_creator_user_token as `maybe_creator_user_token: tokens::tokens::users::UserToken`,\n jobs.maybe_creator_anonymous_visitor_token as `maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken`,\n jobs.creator_ip_address,\n\n jobs.inference_category as `inference_category: enums::by_table::generic_inference_jobs::inference_category::InferenceCategory`,\n jobs.maybe_model_type,\n jobs.maybe_model_token,\n jobs.maybe_raw_inference_text,\n jobs.maybe_inference_args,\n\n jobs.frontend_failure_category as `maybe_frontend_failure_category: enums::by_table::generic_inference_jobs::frontend_failure_category::FrontendFailureCategory`,\n\n jobs.on_success_result_entity_type as maybe_result_entity_type,\n jobs.on_success_result_entity_token as maybe_result_entity_token,\n\n model_weights.title as maybe_model_weights_title,\n tts_models.title as maybe_tts_model_title,\n voice_conversion_models.title as maybe_voice_conversion_model_title,\n\n tts_results.public_bucket_wav_audio_path as maybe_tts_public_bucket_path,\n voice_conversion_results.public_bucket_hash as maybe_voice_conversion_public_bucket_hash,\n\n media_files.public_bucket_directory_hash as maybe_media_file_public_bucket_directory_hash,\n media_files.maybe_public_bucket_prefix as maybe_media_file_public_bucket_prefix,\n media_files.maybe_public_bucket_extension as maybe_media_file_public_bucket_extension,\n\n jobs.assigned_worker as maybe_assigned_worker,\n jobs.assigned_cluster as maybe_assigned_cluster,\n\n jobs.is_keepalive_required,\n\n jobs.created_at,\n jobs.updated_at,\n\n jobs.first_started_at as maybe_first_started_at,\n jobs.successfully_completed_at as maybe_successfully_completed_at\n\nFROM generic_inference_jobs as jobs\n\nLEFT OUTER JOIN model_weights ON jobs.maybe_model_token = model_weights.token\nLEFT OUTER JOIN tts_models ON jobs.maybe_model_token = tts_models.token\nLEFT OUTER JOIN voice_conversion_models ON jobs.maybe_model_token = voice_conversion_models.token\n\nLEFT OUTER JOIN tts_results ON jobs.on_success_result_entity_token = tts_results.token\nLEFT OUTER JOIN voice_conversion_results ON jobs.on_success_result_entity_token = voice_conversion_results.token\nLEFT OUTER JOIN media_files ON jobs.on_success_result_entity_token = media_files.token\n\nWHERE jobs.token = ?\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -292,16 +292,6 @@
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 29,
|
||||
"name": "database_clock",
|
||||
"type_info": {
|
||||
"type": "Datetime",
|
||||
"flags": "NOT_NULL | BINARY",
|
||||
"char_set": 63,
|
||||
"max_size": 19
|
||||
}
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
@@ -336,9 +326,8 @@
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
false
|
||||
true
|
||||
]
|
||||
},
|
||||
"hash": "e5121d132d93ec43e48197e00b19040a50ff2942224dc70b0faa0ec988aee7cf"
|
||||
"hash": "7d5030b221e9b470ee7af4b73539fd2ef477e6f3c98c56422016449c6775222d"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nUPDATE media_files\nSET\n maybe_animation_type = ?\nWHERE\n token = ?\nLIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "930cfd52f78fa14a86bd1a67c5fe36d8c8961079b2bd684a0d4da315bf3ce16e"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nINSERT INTO browser_session_logs\nSET\n token = ?,\n ip_address = ?,\n maybe_user_token = ?,\n maybe_anonymous_visitor_token = ?,\n maybe_last_action = ?\nON DUPLICATE KEY UPDATE\n maybe_last_action = ?,\n update_count = update_count + 1,\n maybe_last_updated_at = NOW()\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 6
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "b1ee86b547130219e2a5958ff3eed295e87c46ffd5268b83a258c74f4ffc2e18"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nUPDATE media_files\nSET\n maybe_engine_category = ?\nWHERE\n token = ?\nLIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "b56ee40be840cdec013f3f99eb585e4ac333ccfe563ba3da4c9a80df33dccd57"
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"db_name": "MySQL",
|
||||
"query": "\nUPDATE beta_keys\nSET\n is_distributed = ?\nWHERE\n token = ?\nLIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Right": 2
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "beb8e02f9025879aa08de5ce2b55f17e3645f682a474d72eabb2f5bce8403b98"
|
||||
}
|
||||
+39
-50
@@ -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 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 ",
|
||||
"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 ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -65,16 +65,6 @@
|
||||
},
|
||||
{
|
||||
"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",
|
||||
@@ -84,7 +74,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"ordinal": 7,
|
||||
"name": "maybe_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -94,7 +84,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"ordinal": 8,
|
||||
"name": "maybe_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -104,7 +94,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"ordinal": 9,
|
||||
"name": "maybe_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -114,7 +104,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 11,
|
||||
"ordinal": 10,
|
||||
"name": "maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -124,7 +114,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 12,
|
||||
"ordinal": 11,
|
||||
"name": "maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -134,7 +124,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"ordinal": 12,
|
||||
"name": "maybe_style_transfer_source_media_file_token: tokens::tokens::media_files::MediaFileToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -144,7 +134,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"ordinal": 13,
|
||||
"name": "maybe_scene_source_media_file_token: tokens::tokens::media_files::MediaFileToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -154,7 +144,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"ordinal": 14,
|
||||
"name": "maybe_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -164,7 +154,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"ordinal": 15,
|
||||
"name": "maybe_text_transcript",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
@@ -174,7 +164,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"ordinal": 16,
|
||||
"name": "maybe_origin_filename",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -184,7 +174,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 18,
|
||||
"ordinal": 17,
|
||||
"name": "maybe_duration_millis",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -194,7 +184,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 19,
|
||||
"ordinal": 18,
|
||||
"name": "maybe_prompt_token: tokens::tokens::prompts::PromptToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -204,7 +194,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 20,
|
||||
"ordinal": 19,
|
||||
"name": "maybe_other_prompt_args",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
@@ -214,7 +204,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 21,
|
||||
"ordinal": 20,
|
||||
"name": "maybe_file_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -224,7 +214,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 22,
|
||||
"ordinal": 21,
|
||||
"name": "maybe_file_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -234,7 +224,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 23,
|
||||
"ordinal": 22,
|
||||
"name": "maybe_file_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -244,7 +234,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 24,
|
||||
"ordinal": 23,
|
||||
"name": "creator_set_visibility: enums::common::visibility::Visibility",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -254,7 +244,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 25,
|
||||
"ordinal": 24,
|
||||
"name": "maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -264,7 +254,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 26,
|
||||
"ordinal": 25,
|
||||
"name": "maybe_model_weights_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -274,7 +264,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 27,
|
||||
"ordinal": 26,
|
||||
"name": "maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -284,7 +274,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 28,
|
||||
"ordinal": 27,
|
||||
"name": "maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -294,7 +284,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 29,
|
||||
"ordinal": 28,
|
||||
"name": "maybe_model_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -304,7 +294,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 30,
|
||||
"ordinal": 29,
|
||||
"name": "maybe_model_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -314,7 +304,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 31,
|
||||
"ordinal": 30,
|
||||
"name": "maybe_model_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -324,7 +314,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 32,
|
||||
"ordinal": 31,
|
||||
"name": "maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -334,7 +324,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 33,
|
||||
"ordinal": 32,
|
||||
"name": "maybe_model_weight_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -344,7 +334,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 34,
|
||||
"ordinal": 33,
|
||||
"name": "maybe_model_weight_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -354,7 +344,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 35,
|
||||
"ordinal": 34,
|
||||
"name": "maybe_model_weight_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -364,7 +354,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 36,
|
||||
"ordinal": 35,
|
||||
"name": "public_bucket_directory_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -374,7 +364,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 37,
|
||||
"ordinal": 36,
|
||||
"name": "maybe_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -384,7 +374,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 38,
|
||||
"ordinal": 37,
|
||||
"name": "maybe_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -394,7 +384,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 39,
|
||||
"ordinal": 38,
|
||||
"name": "maybe_ratings_positive_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -404,7 +394,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 40,
|
||||
"ordinal": 39,
|
||||
"name": "maybe_ratings_negative_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -414,7 +404,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 41,
|
||||
"ordinal": 40,
|
||||
"name": "maybe_bookmark_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -424,7 +414,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 42,
|
||||
"ordinal": 41,
|
||||
"name": "is_featured",
|
||||
"type_info": {
|
||||
"type": "LongLong",
|
||||
@@ -434,7 +424,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 43,
|
||||
"ordinal": 42,
|
||||
"name": "created_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -444,7 +434,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 44,
|
||||
"ordinal": 43,
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -481,7 +471,6 @@
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
@@ -505,5 +494,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "f1861dc84015b5c753cb5c31313c747386bce56983108fd6a01815d02d429630"
|
||||
"hash": "beda05b1f3e3f78ca2610c491e682ea1c76fb5effccd5d710761353baf8ce161"
|
||||
}
|
||||
+39
-50
@@ -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 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 ",
|
||||
"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 ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@@ -65,16 +65,6 @@
|
||||
},
|
||||
{
|
||||
"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",
|
||||
@@ -84,7 +74,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 8,
|
||||
"ordinal": 7,
|
||||
"name": "maybe_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -94,7 +84,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 9,
|
||||
"ordinal": 8,
|
||||
"name": "maybe_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -104,7 +94,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 10,
|
||||
"ordinal": 9,
|
||||
"name": "maybe_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -114,7 +104,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 11,
|
||||
"ordinal": 10,
|
||||
"name": "maybe_creator_anonymous_visitor_token: tokens::tokens::anonymous_visitor_tracking::AnonymousVisitorTrackingToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -124,7 +114,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 12,
|
||||
"ordinal": 11,
|
||||
"name": "maybe_batch_token: tokens::tokens::batch_generations::BatchGenerationToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -134,7 +124,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 13,
|
||||
"ordinal": 12,
|
||||
"name": "maybe_style_transfer_source_media_file_token: tokens::tokens::media_files::MediaFileToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -144,7 +134,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 14,
|
||||
"ordinal": 13,
|
||||
"name": "maybe_scene_source_media_file_token: tokens::tokens::media_files::MediaFileToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -154,7 +144,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 15,
|
||||
"ordinal": 14,
|
||||
"name": "maybe_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -164,7 +154,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 16,
|
||||
"ordinal": 15,
|
||||
"name": "maybe_text_transcript",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
@@ -174,7 +164,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 17,
|
||||
"ordinal": 16,
|
||||
"name": "maybe_origin_filename",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -184,7 +174,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 18,
|
||||
"ordinal": 17,
|
||||
"name": "maybe_duration_millis",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -194,7 +184,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 19,
|
||||
"ordinal": 18,
|
||||
"name": "maybe_prompt_token: tokens::tokens::prompts::PromptToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -204,7 +194,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 20,
|
||||
"ordinal": 19,
|
||||
"name": "maybe_other_prompt_args",
|
||||
"type_info": {
|
||||
"type": "Blob",
|
||||
@@ -214,7 +204,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 21,
|
||||
"ordinal": 20,
|
||||
"name": "maybe_file_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -224,7 +214,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 22,
|
||||
"ordinal": 21,
|
||||
"name": "maybe_file_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -234,7 +224,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 23,
|
||||
"ordinal": 22,
|
||||
"name": "maybe_file_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -244,7 +234,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 24,
|
||||
"ordinal": 23,
|
||||
"name": "creator_set_visibility: enums::common::visibility::Visibility",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -254,7 +244,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 25,
|
||||
"ordinal": 24,
|
||||
"name": "maybe_model_weights_token: tokens::tokens::model_weights::ModelWeightToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -264,7 +254,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 26,
|
||||
"ordinal": 25,
|
||||
"name": "maybe_model_weights_title",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -274,7 +264,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 27,
|
||||
"ordinal": 26,
|
||||
"name": "maybe_model_weights_type: enums::by_table::model_weights::weights_types::WeightsType",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -284,7 +274,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 28,
|
||||
"ordinal": 27,
|
||||
"name": "maybe_model_weights_category: enums::by_table::model_weights::weights_category::WeightsCategory",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -294,7 +284,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 29,
|
||||
"ordinal": 28,
|
||||
"name": "maybe_model_cover_image_public_bucket_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -304,7 +294,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 30,
|
||||
"ordinal": 29,
|
||||
"name": "maybe_model_cover_image_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -314,7 +304,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 31,
|
||||
"ordinal": 30,
|
||||
"name": "maybe_model_cover_image_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -324,7 +314,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 32,
|
||||
"ordinal": 31,
|
||||
"name": "maybe_model_weight_creator_user_token: tokens::tokens::users::UserToken",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -334,7 +324,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 33,
|
||||
"ordinal": 32,
|
||||
"name": "maybe_model_weight_creator_username",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -344,7 +334,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 34,
|
||||
"ordinal": 33,
|
||||
"name": "maybe_model_weight_creator_display_name",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -354,7 +344,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 35,
|
||||
"ordinal": 34,
|
||||
"name": "maybe_model_weight_creator_gravatar_hash",
|
||||
"type_info": {
|
||||
"type": "String",
|
||||
@@ -364,7 +354,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 36,
|
||||
"ordinal": 35,
|
||||
"name": "public_bucket_directory_hash",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -374,7 +364,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 37,
|
||||
"ordinal": 36,
|
||||
"name": "maybe_public_bucket_prefix",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -384,7 +374,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 38,
|
||||
"ordinal": 37,
|
||||
"name": "maybe_public_bucket_extension",
|
||||
"type_info": {
|
||||
"type": "VarString",
|
||||
@@ -394,7 +384,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 39,
|
||||
"ordinal": 38,
|
||||
"name": "maybe_ratings_positive_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -404,7 +394,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 40,
|
||||
"ordinal": 39,
|
||||
"name": "maybe_ratings_negative_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -414,7 +404,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 41,
|
||||
"ordinal": 40,
|
||||
"name": "maybe_bookmark_count",
|
||||
"type_info": {
|
||||
"type": "Long",
|
||||
@@ -424,7 +414,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 42,
|
||||
"ordinal": 41,
|
||||
"name": "is_featured",
|
||||
"type_info": {
|
||||
"type": "LongLong",
|
||||
@@ -434,7 +424,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 43,
|
||||
"ordinal": 42,
|
||||
"name": "created_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -444,7 +434,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ordinal": 44,
|
||||
"ordinal": 43,
|
||||
"name": "updated_at",
|
||||
"type_info": {
|
||||
"type": "Timestamp",
|
||||
@@ -481,7 +471,6 @@
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
@@ -505,5 +494,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "58cb3fd03fb215b1d323f6aa6a5fd713900b9d931700c4226a1d9713b5e469c7"
|
||||
"hash": "bfbe17ad0d993033c1015881f679fc27f5f16fb3edb24e30295c8188ff63d5cd"
|
||||
}
|
||||
Generated
+1457
-1828
File diff suppressed because it is too large
Load Diff
+7
-1
@@ -27,6 +27,7 @@ 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",
|
||||
@@ -53,7 +54,6 @@ members = [
|
||||
"crates/lib/idempotency",
|
||||
"crates/lib/jobs_common",
|
||||
"crates/lib/logging",
|
||||
"crates/lib/markdown",
|
||||
"crates/lib/migration",
|
||||
"crates/lib/mysql_queries",
|
||||
"crates/lib/password",
|
||||
@@ -71,6 +71,9 @@ members = [
|
||||
#"crates/lib/api_clients/fakeyou_client",
|
||||
#"crates/lib/sqlite_queries",
|
||||
|
||||
# Programs: Desktop apps
|
||||
#"crates/programs/aichatbot-sidecar",
|
||||
|
||||
# Services: API servers, jobs, workers, etc.
|
||||
"crates/service/job/analytics_job",
|
||||
"crates/service/job/download_job",
|
||||
@@ -81,13 +84,16 @@ 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",
|
||||
"crates/service/plugins/inference_workloads",
|
||||
"crates/service/plugins/user_traits_component",
|
||||
"crates/service/plugins/users",
|
||||
|
||||
# Vendored code
|
||||
"crates/vendor/limitation",
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import re
|
||||
import requests
|
||||
import uuid
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
create_api_token_url = 'http://localhost:12345/api_tokens/create'
|
||||
edit_api_token_url = 'http://localhost:12345/api_tokens/edit'
|
||||
delete_api_token_url = 'http://localhost:12345/api_tokens/{}/delete'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
}
|
||||
|
||||
r = requests.post(create_api_token_url, cookies=cookies, json=payload)
|
||||
|
||||
print("===== Created API Token =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
api_token = json.loads(r.content)
|
||||
|
||||
|
||||
payload = {
|
||||
'api_token': api_token['api_token'],
|
||||
'maybe_short_description': 'this describes my token',
|
||||
}
|
||||
r = requests.post(edit_api_token_url, cookies=cookies, json=payload)
|
||||
|
||||
print("===== Edited API Token =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
url = delete_api_token_url.format(api_token['api_token'])
|
||||
r = requests.post(url, cookies=cookies)
|
||||
|
||||
print("===== Deleted API Token =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import re
|
||||
import requests
|
||||
import uuid
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
category_create_url = 'http://localhost:12345/category/create'
|
||||
category_delete_url_format = 'http://localhost:12345/category/{}/delete'
|
||||
category_edit_url_format = 'http://localhost:12345/category/{}/edit'
|
||||
tts_model_list_url = 'http://localhost:12345/tts/list'
|
||||
tts_category_assignment_url = 'http://localhost:12345/category/assign/tts'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== [1] Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
|
||||
print("===== [2] Create Category =====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'name': 'First Category',
|
||||
'model_type': 'tts', # tts or w2l
|
||||
'can_directly_have_models': False,
|
||||
'can_have_subcategories': True,
|
||||
'is_mod_approved': True,
|
||||
}
|
||||
|
||||
r = requests.post(category_create_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
|
||||
d = json.loads(r.content)
|
||||
category_token = d['token']
|
||||
|
||||
print(f'created category token: #{category_token}')
|
||||
|
||||
|
||||
print("===== [3] (Soft) Delete Category =====")
|
||||
|
||||
category_delete_url = category_delete_url_format.format(category_token)
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'set_delete': True,
|
||||
}
|
||||
|
||||
r = requests.post(category_delete_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
|
||||
print("===== [4] Undelete Category =====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'set_delete': False,
|
||||
}
|
||||
|
||||
r = requests.post(category_delete_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
|
||||
print("===== [5] Edit Category =====")
|
||||
|
||||
category_edit_url = category_edit_url_format.format(category_token)
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'name': 'Edited Name',
|
||||
'dropdown_name': 'Edited Dropdown Name',
|
||||
'can_directly_have_models': True,
|
||||
'can_have_subcategories': True,
|
||||
'can_only_mods_apply': False,
|
||||
'is_mod_approved': True,
|
||||
'maybe_mod_comments': 'mod comment',
|
||||
}
|
||||
|
||||
r = requests.post(category_edit_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
|
||||
print("===== [6] List TTS Models =====")
|
||||
|
||||
r = requests.get(tts_model_list_url, cookies=cookies)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
|
||||
d = json.loads(r.content)
|
||||
|
||||
tts_model_token = d['models'][0]['model_token']
|
||||
|
||||
print('TTS model token: {}'.format(tts_model_token))
|
||||
|
||||
|
||||
print("===== [7] Create Category Assignment to TTS Model =====")
|
||||
|
||||
payload = {
|
||||
'category_token': category_token,
|
||||
'tts_model_token': tts_model_token,
|
||||
'assign': True,
|
||||
}
|
||||
|
||||
r = requests.post(tts_category_assignment_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
|
||||
print("===== [8] Delete Category Assignment to TTS Model =====")
|
||||
|
||||
payload = {
|
||||
'category_token': category_token,
|
||||
'tts_model_token': tts_model_token,
|
||||
'assign': False,
|
||||
}
|
||||
|
||||
r = requests.post(tts_category_assignment_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# LOCALHOST ONLY
|
||||
|
||||
curl -vvv \
|
||||
-H "content-type: application/json" \
|
||||
--data '{"username": "echelon", "password": "testing", "password_confirmation": "testing", "email_address": "echelon@gmail.com"}' \
|
||||
http://localhost:12345/create_account
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# LOCALHOST ONLY
|
||||
|
||||
curl -vvv \
|
||||
-H "content-type: application/json" \
|
||||
--data '{"username": "ernest", "password": "knowwhatimean", "password_confirmation": "knowwhatimean", "email_address": "vern@knowwhatimean.com"}' \
|
||||
http://localhost:12345/create_account
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# LOCALHOST ONLY
|
||||
|
||||
curl -vvv \
|
||||
-H "content-type: application/json" \
|
||||
--data '{"username": "vocodes", "password": "testing", "password_confirmation": "testing", "email_address": "vocodes@gmail.com"}' \
|
||||
http://localhost:12345/create_account
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
inference_url = 'http://localhost:12345/tts/inference'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
|
||||
print("===== Infer TTS =====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'tts_model_token': 'TTS_TOKEN',
|
||||
'inference_text': 'this is the text to generate',
|
||||
}
|
||||
|
||||
r = requests.post(inference_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
inference_url = 'http://localhost:12345/w2l/inference'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
|
||||
print("===== Infer W2L =====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'w2l_template_token': 'W2L_TOKEN',
|
||||
'tts_inference_result_token': 'TTS_TOKEN',
|
||||
}
|
||||
|
||||
r = requests.post(inference_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# LOCALHOST ONLY
|
||||
|
||||
curl -vvv \
|
||||
-H "content-type: application/json" \
|
||||
--data '{"username_or_email": "echelon", "password": "BAD_PASSWORD"}' \
|
||||
http://localhost:12345/login
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# LOCALHOST ONLY
|
||||
|
||||
curl -vvv \
|
||||
-H "content-type: application/json" \
|
||||
--data '{"username_or_email": "nobody", "password": "testing"}' \
|
||||
http://localhost:12345/login
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# LOCALHOST ONLY
|
||||
|
||||
curl -vvv \
|
||||
-H "content-type: application/json" \
|
||||
--data '{"username_or_email": "echelon@gmail.com", "password": "testing"}' \
|
||||
http://localhost:12345/login
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# LOCALHOST ONLY
|
||||
|
||||
curl -vvv \
|
||||
-H "content-type: application/json" \
|
||||
--data '{"username_or_email": "echelon", "password": "testing"}' \
|
||||
http://localhost:12345/login
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
logout_url = 'http://localhost:12345/logout'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
r = requests.post(logout_url, cookies=cookies)
|
||||
|
||||
print("===== Logout =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
Executable
+123
@@ -0,0 +1,123 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
import uuid
|
||||
import socket
|
||||
|
||||
# There are some things here that will cause my laptop to freeze!
|
||||
hostname = socket.gethostname()
|
||||
|
||||
def print_response(response):
|
||||
print('\tStatus: {}'.format(response.status_code))
|
||||
for k, v in response.headers.items():
|
||||
print('\t header - {}: {}'.format(k, v))
|
||||
print('\tbody: {}', response.json())
|
||||
|
||||
# ==================== CREATE ACCOUNTS ====================
|
||||
|
||||
def create_user_account(username, password, email):
|
||||
print('Create account: {}'.format(username))
|
||||
signup_url = 'http://localhost:12345/create_account'
|
||||
payload = {
|
||||
'username': username,
|
||||
'password': password,
|
||||
'password_confirmation': password,
|
||||
'email_address': email,
|
||||
}
|
||||
r = requests.post(signup_url, json=payload)
|
||||
print_response(r)
|
||||
|
||||
create_user_account('echelon', 'testing', 'echelon@gmail.com')
|
||||
create_user_account('brandon', 'testing', 'brandon@storyteller.company')
|
||||
create_user_account('nanashi', 'nanashi', 'somebody@somewhere.com')
|
||||
create_user_account('other', 'testing', 'ryu@storyteller.company')
|
||||
create_user_account('raptor9', 'testing', 'raptor9@storyteller.company')
|
||||
create_user_account('ryu', 'testing', 'ryu@storyteller.company')
|
||||
|
||||
# ==================== LOGIN ====================
|
||||
|
||||
def login(username, password):
|
||||
print('Login: {}'.format(username))
|
||||
login_url = 'http://localhost:12345/login'
|
||||
payload = {
|
||||
'username_or_email': username,
|
||||
'password': password,
|
||||
}
|
||||
r = requests.post(login_url, json=payload)
|
||||
print_response(r)
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
return session_cookie
|
||||
|
||||
session_echelon = login('echelon', 'testing')
|
||||
session_nanashi = login('nanashi', 'nanashi')
|
||||
session_brandon = login('brandon', 'testing')
|
||||
session_other = login('other', 'testing')
|
||||
|
||||
# ==================== UPLOAD W2L TEMPLATES ====================
|
||||
|
||||
def upload_w2l_template(content_url, title, session_cookie):
|
||||
print('Upload W2L template')
|
||||
upload_url = 'http://localhost:12345/w2l/upload'
|
||||
cookies = { 'session': session_cookie }
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'title': title,
|
||||
'download_url': content_url,
|
||||
}
|
||||
r = requests.post(upload_url, cookies=cookies, json=payload)
|
||||
print_response(r)
|
||||
|
||||
|
||||
upload_w2l_template('https://drive.google.com/file/d/1yoBSb6nwFUZVI4CD-nM2BSofGdBjC8Nn/view?usp=sharing', 'Mr. Musk', session_nanashi)
|
||||
upload_w2l_template('https://drive.google.com/file/d/1ysBAdRjlSmfWQPFjGlMJpv_zcGmVw7RC/view?usp=sharing', 'short bill clinton clip', session_brandon)
|
||||
upload_w2l_template('https://i.imgur.com/NneE7Eq.jpg', 'itsa me mario!', session_echelon)
|
||||
upload_w2l_template('https://i.imgur.com/W1EYiPU.jpg', 'Creepy Sonic does a gasp', session_echelon)
|
||||
upload_w2l_template('https://i.imgur.com/8U3IdUa.png', 'Creepy Sonic actually talks', session_echelon)
|
||||
upload_w2l_template('https://i.imgur.com/lKaQ4Er.jpg', 'hasta la vista', session_brandon)
|
||||
upload_w2l_template('https://i.imgur.com/uoGuTJo.jpeg', 'what do you mean vern?', session_brandon)
|
||||
upload_w2l_template('https://i.imgur.com/v8k9yau.jpeg', 'Miyamoto-san', session_brandon)
|
||||
|
||||
|
||||
if hostname == 'halide':
|
||||
upload_w2l_template('https://www.youtube.com/watch?v=a7mS9ZdU6k4', 'Steve Jobs talks', session_echelon)
|
||||
upload_w2l_template('https://www.youtube.com/watch?v=6fg8SxgEUYI', 'Paul Graham lectures', session_echelon)
|
||||
|
||||
# ==================== UPLOAD TTS MODELS ====================
|
||||
|
||||
def upload_tts_model(content_url, title, session_cookie):
|
||||
print('Upload TTS model')
|
||||
upload_url = 'http://localhost:12345/tts/upload'
|
||||
cookies = { 'session': session_cookie }
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'title': title,
|
||||
'download_url': content_url,
|
||||
}
|
||||
r = requests.post(upload_url, cookies=cookies, json=payload)
|
||||
print_response(r)
|
||||
|
||||
|
||||
# From others' Google Drives
|
||||
#upload_tts_model('https://drive.google.com/file/d/1grwDGbAsPwCMVfye071TZ6PLUub1KGyR/view?usp=sharing', 'Jorgen', session_nanashi)
|
||||
#upload_tts_model('https://drive.google.com/file/d/1w3oBk5vzyHurqYwP95UEQv-_NeMNu6pt/view?usp=sharing', 'Noire', session_echelon)
|
||||
|
||||
# Copied into Storyteller Google Drive
|
||||
upload_tts_model('https://drive.google.com/file/d/1d8KPwYqbRsGiYx1c4TCW4xCtcRLdIU1s/view?usp=sharing', 'Zephyr', session_echelon)
|
||||
upload_tts_model('https://drive.google.com/file/d/1yhoamPz1NOMy403gu2v8sIx5hPj3LQWs/view?usp=sharing', 'Wakko Warner', session_other)
|
||||
# TEMP COMMENT DUE TO RATE LIMIT upload_tts_model('https://drive.google.com/file/d/1I6KGQZFMMB2ZvCzWEqy9xTgGl0L5cmfP/view?usp=sharing', 'Turret-192', session_echelon)
|
||||
# TEMP COMMENT DUE TO RATE LIMIT upload_tts_model('https://drive.google.com/file/d/1T_hvgGcNOfofhNmDWUqpVtYDdSXQrWdE/view?usp=sharing', 'technoblade-324', session_brandon)
|
||||
# TEMP COMMENT DUE TO RATE LIMIT upload_tts_model('https://drive.google.com/file/d/1NKyRiex3K1J0QyIv2np17D_H0rE98HyK/view?usp=sharing', 'Noire', session_other)
|
||||
# TEMP COMMENT DUE TO RATE LIMIT upload_tts_model('https://drive.google.com/file/d/1VDHDOpsUR8C-MD07vEsnUf1Lpcf8hXg4/view?usp=sharing', 'MatPat80', session_other)
|
||||
# TEMP COMMENT DUE TO RATE LIMIT upload_tts_model('https://drive.google.com/file/d/1atFn4vm7mjkufXNK9TZS6J8WzISrAn3-/view?usp=sharing', 'King Julien-70', session_other)
|
||||
# TEMP COMMENT DUE TO RATE LIMIT upload_tts_model('https://drive.google.com/file/d/1-rlJpi2jAsagn-UCStcCc_ITNycXgn2F/view?usp=sharing', 'Jorgen', session_other)
|
||||
# TEMP COMMENT DUE TO RATE LIMIT upload_tts_model('https://drive.google.com/file/d/1togTNOEKnaarqWWrbZLSwIbZIZ8IT_qw/view?usp=sharing', 'edsheeransinging', session_nanashi)
|
||||
# TEMP COMMENT DUE TO RATE LIMIT
|
||||
# TEMP COMMENT DUE TO RATE LIMIT upload_tts_model('https://drive.google.com/file/d/1OAiu0cZDyUJMemyLc0Btqw7zEQgiN81D/view?usp=sharing', 'Wakko Warner v2 ST21', session_nanashi)
|
||||
|
||||
upload_tts_model('https://drive.google.com/file/d/1vRVI2gQ5tAs8SLQPrR_M1J77L05gGBOp/view?usp=sharing', 'Testing voice', session_nanashi)
|
||||
|
||||
#upload_tts_model('', '', session_other)
|
||||
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
session_info_url = 'http://localhost:12345/session'
|
||||
|
||||
|
||||
r = requests.get(session_info_url)
|
||||
|
||||
print("===== Session Info (logged out) =====")
|
||||
print(r.content)
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
r = requests.get(session_info_url, cookies=cookies)
|
||||
|
||||
print("===== Session Info (logged in) =====")
|
||||
print(r.content)
|
||||
|
||||
+306
@@ -0,0 +1,306 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import json
|
||||
import re
|
||||
import requests
|
||||
import uuid
|
||||
import pprint
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
create_url = 'http://localhost:12345/twitch/event_rule/create'
|
||||
list_url = 'http://localhost:12345/twitch/event_rule/list'
|
||||
update_url = 'http://localhost:12345/twitch/event_rule/{}/update'
|
||||
delete_url = 'http://localhost:12345/twitch/event_rule/{}/delete'
|
||||
|
||||
|
||||
def delete_rule(token, cookies):
|
||||
url = delete_url.format(token)
|
||||
r = requests.delete(url, cookies=cookies)
|
||||
print("===== Deleted Event Rule Output =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
def create_rule(payload, cookies):
|
||||
r = requests.post(create_url, cookies=cookies, json=payload)
|
||||
print("===== Created Event Rule Output =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
|
||||
# ========== Setup / Login ==========
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
# ========== Delete All Existing ==========
|
||||
|
||||
r = requests.get(list_url, cookies=cookies)
|
||||
|
||||
print("===== List Event Rule Output =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
response = json.loads(r.content)
|
||||
|
||||
tokens = [rule['token'] for rule in response['twitch_event_rules']]
|
||||
for token in tokens:
|
||||
delete_rule(token, cookies)
|
||||
|
||||
# ========== Create (1) ==========
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'bits',
|
||||
'event_match_predicate': {
|
||||
'bits_spend_threshold': {
|
||||
'minimum_bits_spent': 1,
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': False,
|
||||
}
|
||||
|
||||
r = requests.post(create_url, cookies=cookies, json=payload)
|
||||
|
||||
print("===== Created Event Rule Output =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
response = json.loads(r.content)
|
||||
token = response['twitch_event_rule_token']
|
||||
|
||||
# ========== Update (1) ==========
|
||||
|
||||
payload = {
|
||||
'event_match_predicate': {
|
||||
'bits_spend_threshold': {
|
||||
'minimum_bits_spent': 12345,
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 123,
|
||||
'rule_is_disabled': True,
|
||||
}
|
||||
url = update_url.format(token)
|
||||
r = requests.post(url, cookies=cookies, json=payload)
|
||||
|
||||
print("===== Edited Event Rule Output =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
|
||||
# ========== Create: Bits Spend Threshold ==========
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'bits',
|
||||
'event_match_predicate': {
|
||||
'bits_spend_threshold': {
|
||||
'minimum_bits_spent': 1000,
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': True,
|
||||
}
|
||||
|
||||
create_rule(payload, cookies)
|
||||
|
||||
# ========== Create: Cheermote Exact Match ==========
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'bits',
|
||||
'event_match_predicate': {
|
||||
'bits_cheermote_name_exact_match': {
|
||||
'cheermote_name': 'Cheer1',
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': False,
|
||||
}
|
||||
|
||||
create_rule(payload, cookies)
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'bits',
|
||||
'event_match_predicate': {
|
||||
'bits_cheermote_name_exact_match': {
|
||||
'cheermote_name': 'Corgo5000',
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': False,
|
||||
}
|
||||
|
||||
create_rule(payload, cookies)
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'bits',
|
||||
'event_match_predicate': {
|
||||
'bits_cheermote_name_exact_match': {
|
||||
'cheermote_name': 'ZomboCom5000',
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': False,
|
||||
}
|
||||
|
||||
create_rule(payload, cookies)
|
||||
|
||||
# ========== Create: Cheermote Prefix And Spend Threshold ==========
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'bits',
|
||||
'event_match_predicate': {
|
||||
'bits_cheermote_prefix_spend_threshold': {
|
||||
'cheermote_prefix': 'DoodleCheer',
|
||||
'minimum_bits_spent': 1000,
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': False,
|
||||
}
|
||||
|
||||
create_rule(payload, cookies)
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'bits',
|
||||
'event_match_predicate': {
|
||||
'bits_cheermote_prefix_spend_threshold': {
|
||||
'cheermote_prefix': 'Corgo',
|
||||
'minimum_bits_spent': 12345,
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': False,
|
||||
}
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'bits',
|
||||
'event_match_predicate': {
|
||||
'bits_cheermote_prefix_spend_threshold': {
|
||||
'cheermote_prefix': 'ZomboCom',
|
||||
'minimum_bits_spent': 1000,
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': False,
|
||||
}
|
||||
|
||||
create_rule(payload, cookies)
|
||||
|
||||
# ========== Create: Channel Points ==========
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'channel_points',
|
||||
'event_match_predicate': {
|
||||
'channel_points_reward_name_exact_match': {
|
||||
'reward_name': 'My Reward',
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_single_voice': {
|
||||
'tts_model_token': 'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': False,
|
||||
}
|
||||
|
||||
create_rule(payload, cookies)
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'event_category': 'channel_points',
|
||||
'event_match_predicate': {
|
||||
'channel_points_reward_name_exact_match': {
|
||||
'reward_name': 'My Reward',
|
||||
},
|
||||
},
|
||||
'event_response': {
|
||||
'tts_random_voice': {
|
||||
'tts_model_tokens': [
|
||||
'TM:40m3aqtt41y0', # "Wakko" voice (dev)
|
||||
'TM:4c1hycjj3a3t', # "Zephyr" voice (dev)
|
||||
],
|
||||
}
|
||||
},
|
||||
'user_specified_rule_order': 0,
|
||||
'rule_is_disabled': False,
|
||||
}
|
||||
|
||||
create_rule(payload, cookies)
|
||||
|
||||
# ========== List ==========
|
||||
|
||||
r = requests.get(list_url, cookies=cookies)
|
||||
|
||||
print("===== List Event Rule Output =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
response = json.loads(r.content)
|
||||
pprint.pprint(response)
|
||||
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
import uuid
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
upload_url = 'http://localhost:12345/tts/upload'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
|
||||
print("===== Upload TTS=====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'title': 'this is a new text to speech model',
|
||||
'download_url': 'https://website.com',
|
||||
}
|
||||
|
||||
r = requests.post(upload_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
import uuid
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
upload_url = 'http://localhost:12345/tts/upload'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
|
||||
print("===== Upload TTS=====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'title': 'this is a new text to speech model',
|
||||
'download_url': 'https://drive.google.com/file/d/15-tkgblTZpa0ifmvvyr_kgWy2cguTpAe/view?usp=sharing',
|
||||
}
|
||||
|
||||
r = requests.post(upload_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import re
|
||||
import requests
|
||||
import uuid
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
upload_url = 'http://localhost:12345/w2l/upload'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
|
||||
print("===== Upload W2L =====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'title': 'this is a new text to W2L template',
|
||||
'download_url': 'https://video.com',
|
||||
}
|
||||
|
||||
r = requests.post(upload_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
import uuid
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
upload_url = 'http://localhost:12345/w2l/upload'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
|
||||
print("===== Upload W2L =====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
# mario.zip
|
||||
#download_url = 'https://drive.google.com/file/d/15-tkgblTZpa0ifmvvyr_kgWy2cguTpAe/view?usp=sharing'
|
||||
# elon_integration_test.jpg
|
||||
download_url = 'https://drive.google.com/file/d/1yoBSb6nwFUZVI4CD-nM2BSofGdBjC8Nn/view?usp=sharing'
|
||||
|
||||
#download_url = 'https://i.imgur.com/...'
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'title': 'this is a new image template',
|
||||
'download_url': download_url,
|
||||
}
|
||||
|
||||
r = requests.post(upload_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
import uuid
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
upload_url = 'http://localhost:12345/w2l/upload'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
|
||||
def upload(url):
|
||||
print("===== Upload W2L =====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'title': 'this is a new image template',
|
||||
'download_url': url,
|
||||
}
|
||||
|
||||
r = requests.post(upload_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
|
||||
upload('https://i.imgur.com/W1EYiPU.jpg')
|
||||
|
||||
upload('https://i.imgur.com/NneE7Eq.jpg')
|
||||
|
||||
upload('https://i.imgur.com/v8k9yau.jpeg')
|
||||
|
||||
upload('https://drive.google.com/file/d/1yoBSb6nwFUZVI4CD-nM2BSofGdBjC8Nn/view?usp=sharing')
|
||||
|
||||
upload('https://drive.google.com/file/d/1ysBAdRjlSmfWQPFjGlMJpv_zcGmVw7RC/view?usp=sharing')
|
||||
|
||||
upload('https://i.imgur.com/lKaQ4Er.jpg')
|
||||
|
||||
upload('https://i.imgur.com/uoGuTJo.jpeg')
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import re
|
||||
import uuid
|
||||
|
||||
login_url = 'http://localhost:12345/login'
|
||||
upload_url = 'http://localhost:12345/w2l/upload'
|
||||
|
||||
payload = {
|
||||
'username_or_email': 'echelon',
|
||||
'password': 'testing',
|
||||
}
|
||||
|
||||
r = requests.post(login_url, json=payload)
|
||||
|
||||
print("===== Login =====")
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
for k, v in r.headers.items():
|
||||
print(' {}: {}'.format(k, v))
|
||||
|
||||
# NB: May not be set due to cookie domain:
|
||||
#r.cookies['session']
|
||||
|
||||
raw_set_cookie_header = r.headers['set-cookie']
|
||||
m = re.match(r'session=([^;\s]+);', raw_set_cookie_header)
|
||||
session_cookie = m.group(1)
|
||||
|
||||
|
||||
print("===== Upload W2L =====")
|
||||
|
||||
cookies = { 'session': session_cookie }
|
||||
|
||||
# mario.zip
|
||||
#download_url = 'https://drive.google.com/file/d/15-tkgblTZpa0ifmvvyr_kgWy2cguTpAe/view?usp=sharing'
|
||||
# elon_integration_test.jpg
|
||||
#download_url = 'https://drive.google.com/file/d/1yoBSb6nwFUZVI4CD-nM2BSofGdBjC8Nn/view?usp=sharing'
|
||||
# bill-integration-test.mp4
|
||||
# NB: This freezes up my poor laptop:
|
||||
###download_url = 'https://drive.google.com/file/d/14yO_60lc1FJCYhDGaeiQabgGvYLa86WI/THIS_IS_TOO_BIGview?usp=sharing'
|
||||
# bill-integration-small.mp4 (small enough to run on my laptop)
|
||||
download_url = 'https://drive.google.com/file/d/1ysBAdRjlSmfWQPFjGlMJpv_zcGmVw7RC/view?usp=sharing'
|
||||
|
||||
payload = {
|
||||
'idempotency_token': str(uuid.uuid4()),
|
||||
'title': 'this is a new image template',
|
||||
'download_url': download_url,
|
||||
}
|
||||
|
||||
r = requests.post(upload_url, cookies=cookies, json=payload)
|
||||
|
||||
print('Status: {}'.format(r.status_code))
|
||||
print(r.content)
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from badges\G"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from ip_address_bans\G"
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from firehose_entries\G"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u root \
|
||||
-proot \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from user_sessions\G"
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from tts_inference_jobs\G"
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from tts_results\G"
|
||||
|
||||
|
||||
#echo '==============================================='
|
||||
#
|
||||
#read -r -d '' query << EOF
|
||||
#
|
||||
# SELECT
|
||||
# w2l_results.token as w2l_result_token,
|
||||
# w2l_results.maybe_tts_inference_result_token,
|
||||
# w2l_templates.token as maybe_w2l_template_token,
|
||||
# w2l_templates.template_type,
|
||||
# users.token as maybe_creator_user_token,
|
||||
# users.username as maybe_creator_username,
|
||||
# users.display_name as maybe_creator_display_name,
|
||||
# w2l_results.file_size_bytes,
|
||||
# w2l_results.frame_width,
|
||||
# w2l_results.frame_height,
|
||||
# w2l_results.duration_millis,
|
||||
# w2l_results.created_at,
|
||||
# w2l_results.updated_at
|
||||
# FROM
|
||||
# w2l_results
|
||||
# LEFT OUTER JOIN w2l_templates ON w2l_results.maybe_w2l_template_token = w2l_templates.token
|
||||
# LEFT OUTER JOIN users ON w2l_results.maybe_creator_user_token = users.token
|
||||
# WHERE
|
||||
# w2l_results.deleted_at IS NULL
|
||||
# AND users.username = 'echelon'\G
|
||||
#EOF
|
||||
#
|
||||
#echo $query
|
||||
#
|
||||
#mysql -u root \
|
||||
# -proot \
|
||||
# -h localhost \
|
||||
# -D storyteller \
|
||||
# -e "${query}"
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from tts_models\G"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u root \
|
||||
-proot \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from tts_model_upload_jobs\G"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u root \
|
||||
-proot \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from users\G"
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u root \
|
||||
-proot \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from w2l_inference_jobs\G"
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from w2l_results\G"
|
||||
|
||||
|
||||
echo '==============================================='
|
||||
|
||||
read -r -d '' query << EOF
|
||||
|
||||
SELECT
|
||||
w2l_results.token as w2l_result_token,
|
||||
w2l_results.maybe_tts_inference_result_token,
|
||||
w2l_templates.token as maybe_w2l_template_token,
|
||||
w2l_templates.template_type,
|
||||
users.token as maybe_creator_user_token,
|
||||
users.username as maybe_creator_username,
|
||||
users.display_name as maybe_creator_display_name,
|
||||
w2l_results.file_size_bytes,
|
||||
w2l_results.frame_width,
|
||||
w2l_results.frame_height,
|
||||
w2l_results.duration_millis,
|
||||
w2l_results.created_at,
|
||||
w2l_results.updated_at
|
||||
FROM
|
||||
w2l_results
|
||||
LEFT OUTER JOIN w2l_templates ON w2l_results.maybe_w2l_template_token = w2l_templates.token
|
||||
LEFT OUTER JOIN users ON w2l_results.maybe_creator_user_token = users.token
|
||||
WHERE
|
||||
w2l_results.deleted_at IS NULL
|
||||
AND users.username = 'echelon'\G
|
||||
EOF
|
||||
|
||||
echo $query
|
||||
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "${query}"
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from w2l_templates\G"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u root \
|
||||
-proot \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from w2l_template_upload_jobs\G"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from user_roles\G"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "update users set user_role_slug='admin' where username='echelon' limit 1\G"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "update users set user_role_slug='user' where username='echelon' limit 1\G"
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# ONLY FOR LOCAL DEV
|
||||
mysql -u storyteller \
|
||||
-ppassword \
|
||||
-h localhost \
|
||||
-D storyteller \
|
||||
-e "select * from tts_result_synthetic_ids\G"
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
"settings" : {
|
||||
"index.number_of_shards" : 3,
|
||||
"index.number_of_replicas" : 2
|
||||
},
|
||||
"mappings" : {
|
||||
"properties" : {
|
||||
"token" : { "type" : "keyword" },
|
||||
|
||||
"media_class" : { "type" : "keyword" },
|
||||
"media_type" : { "type" : "keyword" },
|
||||
"maybe_media_subtype" : { "type" : "keyword" },
|
||||
"maybe_engine_category" : { "type" : "keyword" },
|
||||
"maybe_animation_type" : { "type" : "keyword" },
|
||||
|
||||
"maybe_mime_type" : { "type" : "keyword" },
|
||||
|
||||
"public_bucket_hash" : { "type" : "keyword" },
|
||||
"public_bucket_prefix" : { "type" : "keyword" },
|
||||
"public_bucket_extension" : { "type" : "keyword" },
|
||||
|
||||
"creator_set_visibility" : { "type" : "keyword" },
|
||||
|
||||
"maybe_title" : { "type" : "search_as_you_type" },
|
||||
"maybe_title_as_keyword" : { "type" : "keyword" },
|
||||
|
||||
"maybe_cover_image_media_file_token" : { "type" : "keyword" },
|
||||
"maybe_cover_image_public_bucket_hash" : { "type" : "keyword" },
|
||||
"maybe_cover_image_public_bucket_prefix" : { "type" : "keyword" },
|
||||
"maybe_cover_image_public_bucket_extension" : { "type" : "keyword" },
|
||||
|
||||
"maybe_creator_user_token" : { "type" : "keyword" },
|
||||
"maybe_creator_username" : { "type" : "keyword" },
|
||||
"maybe_creator_display_name" : { "type" : "text" },
|
||||
"maybe_creator_gravatar_hash" : { "type" : "text" },
|
||||
|
||||
"created_at" : { "type" : "date" },
|
||||
"updated_at" : { "type" : "date" },
|
||||
"user_deleted_at" : { "type" : "date" },
|
||||
"mod_deleted_at" : { "type" : "date" },
|
||||
|
||||
"is_featured" : {
|
||||
"type": "boolean",
|
||||
"index": true
|
||||
},
|
||||
|
||||
"is_deleted" : {
|
||||
"type": "boolean",
|
||||
"index": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,6 @@
|
||||
"weights_category" : { "type" : "keyword" },
|
||||
|
||||
"title" : { "type" : "search_as_you_type" },
|
||||
"title_as_keyword" : { "type" : "keyword" },
|
||||
|
||||
"maybe_cover_image_media_file_token" : { "type" : "keyword" },
|
||||
"maybe_cover_image_public_bucket_hash" : { "type" : "keyword" },
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
{
|
||||
"bool": {
|
||||
"must" : [
|
||||
{
|
||||
"term": {
|
||||
"is_deleted": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"term": {
|
||||
"media_class": "dimensional"
|
||||
}
|
||||
},
|
||||
{
|
||||
"term": {
|
||||
"media_type": "glb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"bool": {
|
||||
"should": [
|
||||
{ "term": { "maybe_engine_category": "object"} },
|
||||
{ "term": { "maybe_engine_category": "image_plane"} }
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"should": [
|
||||
{
|
||||
"fuzzy": {
|
||||
"maybe_title": {
|
||||
"value": "REPLACE_ME",
|
||||
"fuzziness": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
"maybe_title": {
|
||||
"query": "REPLACE_ME",
|
||||
"boost": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"multi_match": {
|
||||
"query": "REPLACE_ME",
|
||||
"type": "bool_prefix",
|
||||
"fields": [
|
||||
"maybe_title",
|
||||
"maybe_title._2gram",
|
||||
"maybe_title._3gram"
|
||||
],
|
||||
"boost": 50
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
{
|
||||
"bool": {
|
||||
"should": [
|
||||
{
|
||||
"fuzzy": {
|
||||
"title": {
|
||||
"value": "REPLACE_ME",
|
||||
"fuzziness": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
"title": {
|
||||
"query": "REPLACE_ME",
|
||||
"boost": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"multi_match": {
|
||||
"query": "REPLACE_ME",
|
||||
"type": "bool_prefix",
|
||||
"fields": [
|
||||
"title",
|
||||
"title._2gram",
|
||||
"title._3gram"
|
||||
],
|
||||
"boost": 50
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
-1
@@ -14,7 +14,6 @@ UPDATE users SET user_role_slug = "admin" WHERE username IN (
|
||||
'crossproduct',
|
||||
'crossproduct1',
|
||||
'echelon',
|
||||
'endtimes',
|
||||
'fyscott',
|
||||
'mrvintage',
|
||||
'olivicmic',
|
||||
-1
@@ -42,7 +42,6 @@ where token IN (
|
||||
UPDATE users SET maybe_loyalty_program_key = 'fakeyou_contributor' WHERE username IN (
|
||||
'bflat',
|
||||
'brandon',
|
||||
'coliphant',
|
||||
'crossproduct',
|
||||
'crossproduct1',
|
||||
'devdude123',
|
||||
-1
@@ -94,7 +94,6 @@ SET
|
||||
can_access_studio = false,
|
||||
maybe_feature_flags = 'studio,video_style_transfer'
|
||||
WHERE username IN (
|
||||
'FoxtailStudio',
|
||||
'chechisauri0',
|
||||
'dakrid',
|
||||
'omega7321',
|
||||
@@ -1,15 +0,0 @@
|
||||
-- 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
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Find users with studio flags.
|
||||
select username from users where maybe_feature_flags like '%studio%';
|
||||
|
||||
select username from users where can_access_studio = true;
|
||||
|
||||
-- Who signed up recently and has access?
|
||||
select username, maybe_source
|
||||
from users where can_access_studio = true
|
||||
and created_at > NOW() - interval 20 minute;
|
||||
@@ -1,18 +0,0 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- u.user_role_slug = 'admin' as is_staff,
|
||||
-- Users created by studio users in 1 week
|
||||
select
|
||||
u.username,
|
||||
count(*) as video_count
|
||||
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 14 DAY)
|
||||
and m.is_intermediate_system_file = false
|
||||
and m.media_class = 'video'
|
||||
group by u.token
|
||||
order by video_count desc;
|
||||
@@ -1,12 +0,0 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Sync the top-level boolean with the authoritative feature flags field.
|
||||
-- Performs a full table scan and string search, but is relatively quick.
|
||||
-- NB: Can't use users in the subquery:
|
||||
-- ERROR 1093 (HY000): You can't specify target table 'users' for update in FROM clause
|
||||
UPDATE users u INNER JOIN users uf
|
||||
ON u.token = uf.token
|
||||
SET u.can_access_studio = true
|
||||
WHERE uf.maybe_feature_flags like '%studio%';
|
||||
@@ -1,17 +0,0 @@
|
||||
-- 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;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user