Skip to content

Commit e43f83a

Browse files
committedMay 21, 2014
Reduce Datastore Queue Throughput to Limit Persistence Errors.
1 parent 6c55031 commit e43f83a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎queue.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
queue:
2-
- name: store
3-
rate: 35/s
2+
- name: datastore-writes
3+
rate: 10/s
44

55
- name: refresh
66
rate: 10/s

‎tasks.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ var refreshUserData = delay.Func(REFRESH_USER_DATA_FUNCTION_NAME, func(context a
3636
const (
3737
REFRESH_USER_DATA_FUNCTION_NAME = "refreshUserData"
3838
PROCESS_FILE_FUNCTION_NAME = "processSingleFile"
39+
DATASTORE_WRITES_QUEUE_NAME = "datastore-writes"
3940
)
4041

4142
func disabledUpdateUserData(context appengine.Context, userEmail string, autoScheduleNextRun bool) {
@@ -129,7 +130,7 @@ func enqueueFileImport(context appengine.Context, token *oauth.Token, file *driv
129130
}
130131

131132
task.ETA = time.Now().Add(delay)
132-
_, err = taskqueue.Add(context, task, "store")
133+
_, err = taskqueue.Add(context, task, DATASTORE_WRITES_QUEUE_NAME)
133134

134135
return err
135136
}

0 commit comments

Comments
 (0)
Please sign in to comment.