eliminate duplicate tasks from queue
Opened this issue · 2 comments
queue_manager doesn't check that there can be more submissions of the same assignment from the same user in the queue. so if somebody sends 5 archives in a very short time (for example by double clicking or fixing a missed bug) all 5 homeworks will be evaluated.
Submission of the same homework multiple times in a row is disabled at the moment by a timeout specified in the course config file.
However multiple elements may be in the queue for the same user+hw combination, so this is still an open issue.
This can be achieved by deleting other archives in the queue with the same (course ; assignment ; user) before uploading the new one, at https://github.com/rosedu/vmchecker/blob/master/vmchecker/submit.py#L277
Resources:
http://stackoverflow.com/questions/3562403/how-can-you-get-the-ssh-return-code-using-paramiko
http://segfault.in/2010/03/paramiko-ssh-and-sftp-with-python/