Skip to content

Instantly share code, notes, and snippets.

View mayhem's full-sized avatar
💭
Hell bent on total world domination!

Robert Kaye mayhem

💭
Hell bent on total world domination!
View GitHub Profile
CREATE TABLE missing_musicbrainz_data (
id SERIAL, -- PK
user_id INTEGER NOT NULL, --FK to "user".id
source TEXT NOT NULL,
data JSONB NOT NULL,
created TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL
);
[2020-08-13 14:51:36,202] ERROR in candidate_sets: Cannot save empty top artist candidate set
Traceback (most recent call last):
File "/rec/listenbrainz_spark/recommendations/candidate_sets.py", line 297, in save_candidate_sets
top_artist_candidate_set_df.take(1)[0]
IndexError: list index out of range
Sentry is attempting to send 1 pending error messages
Waiting up to 10 seconds
Press Ctrl-C to quit
paco:~/metabrainz/listenbrainz-server->git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: listenbrainz/webserver/static/img/listenbrainz-logo.svg
modified: listenbrainz/webserver/static/img/navbar_logo.svg
listenbrainz=> begin;
BEGIN
listenbrainz=> update spotify_auth
listenbrainz-> set record_listens = 't', error_message = NULL
listenbrainz-> where record_listens = 'f'
listenbrainz-> and permission in ('streaming user-read-currently-playing user-read-birthdate user-read-email user-read-recently-played user-read-private', 'user-read-currently-playing user-read-recently-played', 'user-read-recently-played');
UPDATE 459
listenbrainz=> commit;
COMMIT
listenbrainz=>
update spotify_auth
set record_listens = 't', error_message = NULL
where record_listens = 'f'
and permission in ('streaming user-read-currently-playing user-read-birthdate user-read-email user-read-recently-played user-read-private', 'user-read-currently-playing user-read-recently-played', 'user-read-recently-played');
listenbrainz=> select distinct permission from spotify_auth where record_listens = 'f';
permission
-----------------------------------------------------------------------------------------------------------------------
streaming user-read-birthdate user-read-email user-read-private
streaming user-read-currently-playing user-read-birthdate user-read-email user-read-recently-played user-read-private
streaming user-read-email user-read-private
user-read-currently-playing user-read-recently-played
user-read-recently-played
(5 rows)
[2020-08-12 13:30:30,209] DEBUG in entity: Done!
[2020-08-12 13:30:30,209] DEBUG in request_consumer: Pushing result to RabbitMQ...
[2020-08-12 14:44:19,805] INFO in request_consumer: Done!
[2020-08-12 14:44:19,805] INFO in request_consumer: Number of messages sent: 8110
[2020-08-12 14:44:19,805] INFO in request_consumer: Average size of message: 853267 bytes
[2020-08-12 14:44:19,805] INFO in request_consumer: Request done!
[2020-08-12 14:44:19,805] INFO in request_consumer: Received a request!
[2020-08-12 14:44:19,806] DEBUG in entity: Calculating recordings_week...
[2020-08-12 14:44:20,434] DEBUG in entity: Done!
[2020-08-12 14:44:20,434] DEBUG in request_consumer: Pushing result to RabbitMQ...
[2020-08-10 09:25:20,508] INFO in request_consumer: Request consumer started!
[2020-08-10 09:25:24,034] INFO in request_consumer: Received a request!
[2020-08-10 09:26:05,003] INFO in create_dataframes: Preparing users data and saving to HDFS...
[2020-08-10 09:26:32,222] INFO in create_dataframes: Preparing recordings data and saving to HDFS...
[2020-08-10 09:27:31,834] INFO in create_dataframes: Preparing listen data dump and playcounts, saving playcounts to HDFS...
[2020-08-10 09:29:40,505] DEBUG in request_consumer: Pushing result to RabbitMQ...
[2020-08-10 09:29:40,506] INFO in request_consumer: Done!
[2020-08-10 09:29:40,507] INFO in request_consumer: Number of messages sent: 1
[2020-08-10 09:29:40,507] INFO in request_consumer: Average size of message: 160 bytes
[2020-08-10 09:29:40,508] INFO in request_consumer: Request done!
[2020-08-10 09:01:19,631] INFO in request_consumer: Request consumer started!
t[2020-08-10 09:02:24,148] INFO in request_consumer: Received a request!
[2020-08-10 09:03:09,394] INFO in create_dataframes: Preparing users data and saving to HDFS...
[2020-08-10 09:03:34,864] INFO in create_dataframes: Preparing recordings data and saving to HDFS...
[2020-08-10 09:04:35,735] INFO in create_dataframes: Preparing listen data dump and playcounts, saving playcounts to HDFS...
[2020-08-10 09:06:56,710] DEBUG in request_consumer: Pushing result to RabbitMQ...
[2020-08-10 09:06:56,711] INFO in request_consumer: Done!
[2020-08-10 09:06:56,711] INFO in request_consumer: Number of messages sent: 1
[2020-08-10 09:06:56,711] INFO in request_consumer: Average size of message: 160 bytes
[2020-08-10 09:06:56,711] INFO in request_consumer: Request done!
WITH RECURSIVE area_descendants AS (
SELECT entity0 AS parent, entity1 AS descendant, 1 AS depth
FROM l_area_area laa
JOIN link ON laa.link = link.id
WHERE link.link_type = 356
AND entity1 IN (13703, 81)
UNION
SELECT entity0 AS parent, descendant, (depth + 1) AS depth
FROM l_area_area laa
JOIN link ON laa.link = link.id