Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

explicitly specify the queue name when doing a bakcup

  • Loading branch information...
commit 41e923e69a0935ea39fbaa1dd5cee3ee81db379b 1 parent 89d53e2
@aleemstreak aleemstreak authored
View
6 src/com/streak/datastore/analysis/builtin/BuiltinDatastoreToBigqueryCronTask.java
@@ -73,7 +73,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc
String backupName = AnalysisUtility.getPreBackupName(timestamp, exporterConfig.getBackupNamePrefix());
// start the backup task
- TaskOptions t = createBackupTaskOptions(backupName, exporterConfig.getEntityKindsToExport(), bucketName);
+ TaskOptions t = createBackupTaskOptions(backupName, exporterConfig.getEntityKindsToExport(), bucketName, queue.getQueueName());
queue.add(t);
// start another task to do the actual import into bigquery
@@ -84,7 +84,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc
resp.getWriter().println(AnalysisUtility.successJson("successfully kicked off backup job: " + backupName + ", export to bigquery will begin once backup is complete."));
}
- private TaskOptions createBackupTaskOptions(String backupName, List<String> kindsToExport, String bucketName) {
+ private TaskOptions createBackupTaskOptions(String backupName, List<String> kindsToExport, String bucketName, String queueName) {
TaskOptions t = TaskOptions.Builder.withUrl("/_ah/datastore_admin/backup.create");
t.param("name", backupName);
for (String kind : kindsToExport) {
@@ -93,6 +93,8 @@ private TaskOptions createBackupTaskOptions(String backupName, List<String> kind
t.param("filesystem", "gs");
t.param("gs_bucket_name", bucketName);
+ t.param("queue", queueName);
+
t.method(Method.GET);
t.header("Host", BackendServiceFactory.getBackendService().getBackendAddress(AH_BUILTIN_PYTHON_BUNDLE));
Please sign in to comment.
Something went wrong with that request. Please try again.