Skip to content

Commit

Permalink
Increased the queue timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
bklaing2 committed Jul 7, 2022
1 parent c46a176 commit 2b334d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def create_playlist():
# Add default document
new_id = playlists_coll.insert_one(Playlist(spotify).get_json(new=True)).inserted_id

q.enqueue(create_playlist_helper, new_id, job_timeout=1800) # 30 mins
q.enqueue(create_playlist_helper, new_id, job_timeout=7200) # 2 hrs
return { 'playlist': { 'id': str(new_id), 'spotifyPlaylists': 'generating' } }

def create_playlist_helper(playlist_id):
Expand Down
2 changes: 1 addition & 1 deletion app/src/queue_update_playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
# Add all playlists to worker queues
print('Updating all playlists...')
for obj in playlists_coll.find({ 'token': { '$exists': True }}):
q.enqueue(update_playlist, obj, job_timeout=600) # 10 mins
q.enqueue(update_playlist, obj, job_timeout=1800) # 30 mins

print('Finished updating playlists')

0 comments on commit 2b334d8

Please sign in to comment.