mirror of
https://github.com/DMOJ/online-judge.git
synced 2024-11-25 16:32:37 +08:00
Fix code comments
This commit is contained in:
parent
a2e1f7858e
commit
1946a47eb2
@ -14,7 +14,7 @@ See it live at [dmoj.ca](https://dmoj.ca/)!
|
||||
* Specifying **per-language resource limits**
|
||||
* Capable of scaling to hundreds of judging servers
|
||||
* Extremely configurable contest system:
|
||||
* Supports ICPC/IOI/AtCoder/ECOO formats out-of-the box
|
||||
* Supports ICPC/IOI/AtCoder/ECOO formats out-of-the-box
|
||||
* **System testing** supported
|
||||
* **Hidden scoreboards** and **virtual participation**
|
||||
* [Elo-MMR](https://arxiv.org/abs/2101.00400)-style **rating**
|
||||
|
@ -17,7 +17,7 @@ if hasattr(settings, 'CELERY_RESULT_BACKEND_SECRET'):
|
||||
# Load task modules from all registered Django app configs.
|
||||
app.autodiscover_tasks()
|
||||
|
||||
# Logger to enable errors be reported.
|
||||
# Logger to enable reporting of errors.
|
||||
logger = logging.getLogger('judge.celery')
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Disconnect(Exception):
|
||||
# making it impossible to inherit __init__ sanely. While it lets you
|
||||
# use setup(), most tools will complain about uninitialized variables.
|
||||
# This metaclass will allow sane __init__ behaviour while also magically
|
||||
# calling the methods that handles the request.
|
||||
# calling the methods that handle the request.
|
||||
class RequestHandlerMeta(type):
|
||||
def __call__(cls, *args, **kwargs):
|
||||
handler = super().__call__(*args, **kwargs)
|
||||
|
@ -298,7 +298,7 @@ class JudgeHandler(ZlibPacketHandler):
|
||||
logger.exception('Error in packet handling (Judge-side): %s', self.name)
|
||||
self._packet_exception()
|
||||
# You can't crash here because you aren't so sure about the judges
|
||||
# not being malicious or simply malforms. THIS IS A SERVER!
|
||||
# not being malicious or simply malformed. THIS IS A SERVER!
|
||||
|
||||
def _packet_exception(self):
|
||||
json_log.exception(self._make_json_log(sub=self._working, info='packet processing exception'))
|
||||
|
@ -100,7 +100,7 @@ class Submission(models.Model):
|
||||
|
||||
@property
|
||||
def result_class(self):
|
||||
# This exists to save all these conditionals from being executed (slowly) in each row.jade template
|
||||
# This exists to save all these conditionals from being executed (slowly) in each row.html template
|
||||
if self.status in ('IE', 'CE'):
|
||||
return self.status
|
||||
return Submission.result_class_from_code(self.result, self.case_points, self.case_total)
|
||||
|
@ -23,7 +23,7 @@ else:
|
||||
class PagedownWidget(CompressorWidgetMixin, OldPagedownWidget):
|
||||
# The goal here is to compress all the pagedown JS into one file.
|
||||
# We do not want any further compress down the chain, because
|
||||
# 1. we'll creating multiple large JS files to download.
|
||||
# 1. we'll create multiple large JS files to download.
|
||||
# 2. this is not a problem here because all the pagedown JS files will be used together.
|
||||
compress_js = True
|
||||
|
||||
|
@ -87,7 +87,7 @@
|
||||
{% else %}
|
||||
<div class="time">---</div>
|
||||
{% endif %}
|
||||
{# No one actually like IEC prefixes, Jinja2. #}
|
||||
{# No one actually likes IEC prefixes, Jinja2. #}
|
||||
<div class="memory">{{ (submission.memory_bytes|filesizeformat(True)).replace('i', '') }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user