You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// NOTE: On average, we take about 60 seconds to process 10k users. If, for any reason, the bulk import users were marked as processing but couldn't be processed within 10 minutes, we'll attempt to process them again.
161
160
162
161
// "FOR UPDATE" ensures that multiple cron jobs don't read the same rows simultaneously.
163
162
// If one process locks the first 1000 rows, others will wait for the lock to be released.
164
163
// "SKIP LOCKED" allows other processes to skip locked rows and select the next 1000 available rows.
165
164
StringselectQuery = "SELECT * FROM " + Config.getConfig(start).getBulkImportUsersTable()
166
165
+ " WHERE app_id = ?"
167
-
+ " AND (status = 'NEW' OR (status = 'PROCESSING' AND updated_at < (EXTRACT(EPOCH FROM CURRENT_TIMESTAMP) * 1000) - 10 * 60 * 1000))"/* 10 mins */
166
+
//+ " AND (status = 'NEW' OR (status = 'PROCESSING' AND updated_at < (EXTRACT(EPOCH FROM CURRENT_TIMESTAMP) * 1000) - 10 * 60 * 1000))" /* 10 mins */
167
+
+ " AND (status = 'NEW' OR status = 'PROCESSING' )"
0 commit comments