Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submission reset message #268

Closed
scarroll32 opened this issue Aug 7, 2017 · 4 comments
Closed

Submission reset message #268

scarroll32 opened this issue Aug 7, 2017 · 4 comments

Comments

@scarroll32
Copy link
Contributor

scarroll32 commented Aug 7, 2017

Onr participant writes on the opensnp challenge discussion forum that :

CrowdAIExecuteFunctionError: {"message":"The participant has no submission slots remaining for today.","submission_id":null}
This leads me to believe that there is a submission limit of 5 per day (this should be mentioned explicitly on the overview page). However when I tried to make a submission on the next day (both from my local time and GMT) I still got the same error. I would like to know the time when the number of entries resets.
 7.screen shot 2017 02 22 at 12.48.51

(edited)

This is the error returned by the crowdAI API, which the grader simply relays to the participant
so I am not sure, when exactly the 5 submissions per day limit resets

  • Need to add the reset time to the return message
@scarroll32
Copy link
Contributor Author

The submissions are based on a rolling 24 hour period. We would need to calculate when a slot becomes available (when the first submission has aged out).

  def set_submissions_remaining
      submissions_today = Submission.where("participant_id = ? and created_at >= ?", current_participant.id, Time.now - 24.hours).count
      @submissions_remaining = (@challenge.daily_submissions - submissions_today)
    end

https://github.com/crowdAI/crowdai/blob/master/app/controllers/submissions_controller.rb#L119-L120

@scarroll32
Copy link
Contributor Author

  • Change message to existing endpoint: you will next able able to submit at xx time
  • New endpoint to query how many submissions are remaining or when they next make a submission.

@scarroll32
Copy link
Contributor Author

Will be handled in #327 refactoring

@scarroll32
Copy link
Contributor Author

Incorporated into #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant