Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: appengine/gce-backend/metadata.py

Issue 2713533002: Refactor task enqueuing (Closed)
Patch Set: Remove metric Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/gce-backend/instances.py ('k') | appengine/gce-backend/utilities.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/gce-backend/metadata.py
diff --git a/appengine/gce-backend/metadata.py b/appengine/gce-backend/metadata.py
index 85d937c5b11f234feb65c983c94f29076d6203e5..2dae7234d2da465e89d49a8696c3ee0e265573d2 100644
--- a/appengine/gce-backend/metadata.py
+++ b/appengine/gce-backend/metadata.py
@@ -11,7 +11,6 @@ from google.appengine.ext import ndb
from components import gce
from components import net
-from components import utils
import metrics
import models
@@ -321,11 +320,5 @@ def schedule_metadata_tasks():
elif instance.pending_metadata_updates:
# Enqueue task to compress a list of desired metadata updates.
queue = 'compress-instance-metadata-updates'
- if queue and not utils.enqueue_task(
- '/internal/queues/%s' % queue,
- queue,
- params={
- 'key': instance.key.urlsafe(),
- },
- ):
- logging.warning('Failed to enqueue task for Instance: %s', instance.key)
+ if queue:
+ utilities.enqueue_task(queue, instance.key)
« no previous file with comments | « appengine/gce-backend/instances.py ('k') | appengine/gce-backend/utilities.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698