我在Django中的一个应用程序中定义了多个cron。当我运行python manage.py runcrons
时,发生以下错误。在cron中,我正在访问数据库,并且不同的cron可能会访问同一张表。
我还要通过多个并发子进程来完成我的工作。
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/social/centralsystem/apps/crawler/utils.py", line 12, in user_queuing
model.cancel_crawling()
File "/home/social/centralsystem/apps/social/models.py", line 47, in cancel_crawling
).update(is_crawling_from=None)
File "/home/social/centralsystem/venv/lib/python3.6/site-packages/django/db/models/query.py", line 647, in update
rows = query.get_compiler(self.db).execute_sql(CURSOR)
File "/home/social/centralsystem/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1205, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/home/social/centralsystem/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 900, in execute_sql
raise original_exception
File "/home/social/centralsystem/venv/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 890, in execute_sql
cursor.execute(sql, params)
File "/home/social/centralsystem/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/social/centralsystem/venv/lib/python3.6/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/social/centralsystem/venv/lib/python3.6/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/social/centralsystem/venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.OperationalError: SSL error: decryption failed or bad record mac