@@ -122,8 +122,7 @@ GavelAnnotatorSchema.methods.canVote = async function () {
122122 if ( diffSeconds < Settings . ANNOTATOR_WAIT_SECONDS ) {
123123 return Promise . reject (
124124 new ForbiddenError (
125- `Must wait ${
126- Settings . ANNOTATOR_WAIT_SECONDS - diffSeconds
125+ `Must wait ${ Settings . ANNOTATOR_WAIT_SECONDS - diffSeconds
127126 } more seconds before voting again`,
128127 ) ,
129128 )
@@ -172,7 +171,7 @@ GavelAnnotatorSchema.methods.getPreferredProjects = async function () {
172171 availableProjectsQuery ,
173172 activeAnnotatorsQuery ,
174173 ] )
175- console . log ( "allProjects" , allProjects , "activeAnnotators" , activeAnnotators )
174+ // console.log("allProjects", allProjects, "activeAnnotators", activeAnnotators)
176175 // Helper function
177176 const asyncFilter = async ( arr , predicate ) => {
178177 const results = await Promise . all ( arr . map ( predicate ) )
@@ -189,11 +188,11 @@ GavelAnnotatorSchema.methods.getPreferredProjects = async function () {
189188 if ( project ) {
190189 const team = await Team . findById ( project . team )
191190 if ( team ) {
192- console . log ( this . user , team . owner , ! team . members )
193- console . log (
194- this . user !== team . owner &&
195- ! team . members . includes ( this . user ) ,
196- )
191+ // console.log(this.user, team.owner, !team.members)
192+ // console.log(
193+ // this.user !== team.owner &&
194+ // !team.members.includes(this.user),
195+ // )
197196 return (
198197 this . user !== team . owner &&
199198 ! team . members . includes ( this . user )
@@ -271,11 +270,11 @@ GavelAnnotatorSchema.methods.getNextProject = async function () {
271270}
272271
273272GavelAnnotatorSchema . methods . assignNextProject = async function ( ) {
274- console . log ( 'assigning' )
275- console . log ( this . getNextProject , 'exists?' )
276- console . log ( this , 'even this?' )
273+ // console.log('assigning')
274+ // console.log(this.getNextProject, 'exists?')
275+ // console.log(this, 'even this?')
277276 const nextProject = await this . getNextProject ( )
278- console . log ( 'nextProject' , nextProject )
277+ // console.log('nextProject', nextProject)
279278
280279 if ( ! this . next ) {
281280 if ( nextProject ) {
@@ -293,7 +292,12 @@ GavelAnnotatorSchema.methods.assignNextProject = async function () {
293292 }
294293 }
295294
295+ //FOR GAVEL STRESS TEST:
296+ //comment this out
296297 return this . save ( )
298+
299+ //use this instead
300+ //return this //not saving for testing purposes
297301}
298302
299303GavelAnnotatorSchema . methods . skipCurrentProject = async function ( ) {
0 commit comments