mirror of
https://github.com/DMOJ/online-judge.git
synced 2024-11-25 16:32:37 +08:00
11 lines
378 B
Python
11 lines
378 B
Python
from django.core.cache import cache
|
|
|
|
|
|
def finished_submission(sub):
|
|
keys = ['user_complete:%d' % sub.user_id, 'user_attempted:%s' % sub.user_id]
|
|
if hasattr(sub, 'contest'):
|
|
participation = sub.contest.participation
|
|
keys += ['contest_complete:%d' % participation.id]
|
|
keys += ['contest_attempted:%d' % participation.id]
|
|
cache.delete_many(keys)
|