This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
CREATE PROCEDURE generate_data() | |
BEGIN | |
DECLARE i INT DEFAULT 1; | |
DECLARE num_records INT DEFAULT 150000; | |
DECLARE hours_per_year INT DEFAULT 8760; | |
DECLARE rand_time DATETIME; | |
WHILE i < num_records DO | |
SELECT NOW() - INTERVAL FLOOR(hours_per_year * RAND()) HOUR INTO rand_time; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
CREATE PROCEDURE generate_data() | |
BEGIN | |
DECLARE i INT DEFAULT 1; | |
DECLARE num_records INT DEFAULT 6000000; | |
DECLARE hours_per_5_years INT DEFAULT 43800; | |
DECLARE rand_time DATETIME; | |
WHILE i < num_records DO | |
SELECT NOW() - INTERVAL FLOOR(hours_per_5_years * RAND()) HOUR INTO rand_time; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Checks a shard for outdated GPlay RISs. | |
# | |
# +shard_id+, the shard to run on. | |
def check_shard(shard_id) | |
domain = 'https://gplaychannel.zendesk.com' | |
external_id = '29004837bb8774aebbc595ffc00618c9f4609de66d5ea775950' | |
keys = %i(manifest_url admin_ui_url pull_url channelback_url clickthrough_url health_check_url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"meta": { | |
"total-pages": 5 | |
}, | |
"links": { | |
"self": "http://example.com/field_types?page[number]=2&page[size]=30", | |
"first": "http://example.com/field_types?page[number]=1&page[size]=30", | |
"prev": "http://example.com/field_types?page[number]=1&page[size]=30", | |
"next": "http://example.com/field_types?page[number]=3&page[size]=30", | |
"last": "http://example.com/field_types?page[number]=5&page[size]=30" |