2023-09-04 23:06:59 +01:00
|
|
|
from cloudevents.http import CloudEvent
|
|
|
|
import functions_framework
|
|
|
|
|
2020-08-13 19:50:21 +01:00
|
|
|
from music.cloud.tasks import update_all_user_playlists, refresh_all_user_playlist_stats, update_all_user_tags
|
|
|
|
|
|
|
|
|
2023-09-04 23:06:59 +01:00
|
|
|
@functions_framework.cloud_event
|
|
|
|
def run_all_playlists(event: CloudEvent):
|
2020-08-13 19:50:21 +01:00
|
|
|
update_all_user_playlists()
|
|
|
|
|
|
|
|
|
2023-09-04 23:06:59 +01:00
|
|
|
@functions_framework.cloud_event
|
|
|
|
def run_all_playlist_stats(event: CloudEvent):
|
2020-08-13 19:50:21 +01:00
|
|
|
refresh_all_user_playlist_stats()
|
|
|
|
|
|
|
|
|
2023-09-04 23:06:59 +01:00
|
|
|
@functions_framework.cloud_event
|
|
|
|
def run_all_tags(event: CloudEvent):
|
2020-08-13 19:50:21 +01:00
|
|
|
update_all_user_tags()
|