Skip to content

Conversation

shawn1128
Copy link

the code is in ojbackend directory

@@ -0,0 +1,76 @@
"""
dispatcherFunc.py
This file provides related functions for dispatcher.php.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean dispatcher.py?

import time
import logging
import subprocess, sys
logging.basicConfig(filename = 'dispatcher.log', level = logging.INFO, format = '%(asctime)s ::%(message)s',datafmt = '%m/%d/%Y %I:%M:%S %p')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One coding convention is at most 80 characters in one line,
thanks~

@bruce3557
Copy link
Contributor

Simply comment at first round.
If any idea we can discussion.
Great job!

logging.info('get idleMachine')
while(idleMachine == None):
idleMachine = getIdleMachine()
time.sleep(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

time.sleep(1) should be front of idleMachine = getIdleMachine()

shawn1128 added 3 commits November 9, 2015 02:04
modify dispatcher.py. Not done
modify dispatcherFunc.py
@CHIAHSINHOU
Copy link
Contributor

do not connect to DB every time in while true loop

logging.info('send info to other judge')
arg = judgeLanguage + " " + pid + " " + judgeURL + " " + sid

if os.path.exists("/var/nthuoj/outsideConnection/sendToOtherJudge.sh"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use config

@bruce3557
Copy link
Contributor

Fine with other code
Thanks!

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

Successfully merging this pull request may close these issues.

4 participants