Last active
February 4, 2018 06:56
-
-
Save avivl/f2df757c2af0f553e37e2facb63ebefa to your computer and use it in GitHub Desktop.
This file contains 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
@app.route('/tasks/check-load') | |
def check_load(): | |
"""Entry point for cron task that launches a task for each cluster | |
check cluster stats""" | |
clusters = settings.get_all_clusters_settings() | |
for cluster in clusters.iter(): | |
task = taskqueue.add(queue_name='shamash', | |
url="/monitors", | |
method='GET', | |
params={'cluster_name': cluster.Cluster}) | |
logging.debug('Task %s enqueued, ETA %s.', task.name, task.eta) | |
return 'ok', 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment