add sleep to make backend use less CPU
parent
feadd6ee29
commit
d5c9981efd
|
@ -5,7 +5,7 @@ from config import config
|
|||
from db import db
|
||||
import logging
|
||||
from sendmail import sendmail
|
||||
|
||||
from time import sleep
|
||||
|
||||
def shutdown():
|
||||
try:
|
||||
|
@ -39,6 +39,7 @@ if __name__ == '__main__':
|
|||
for bot2 in bots:
|
||||
bot2.post(user, status)
|
||||
logger.info("Resent: %d %s %s" % (user.uid, status.author, status.text))
|
||||
sleep(1)
|
||||
except Exception:
|
||||
logger.error("Shutdown.", exc_info=True)
|
||||
shutdown()
|
||||
|
|
Loading…
Reference in New Issue