merge conflict resolution

This commit is contained in:
Daniel Welch
2017-10-03 16:55:28 -04:00
3 changed files with 61 additions and 17 deletions
+5 -5
View File
@@ -25,7 +25,7 @@ import signing
import tasks
from django_q.compat import range
from django_q.conf import Conf, logger, psutil, get_ppid, rollbar
from django_q.conf import Conf, logger, psutil, get_ppid, error_reporter
from django_q.models import Task, Success, Schedule
from django_q.status import Stat, Status
from django_q.brokers import get_broker
@@ -365,8 +365,8 @@ def worker(task_queue, result_queue, timer, timeout=Conf.TIMEOUT):
f = getattr(m, func)
except (ValueError, ImportError, AttributeError) as e:
result = (e, False)
if rollbar:
rollbar.report_exc_info()
if error_reporter:
error_reporter.report()
# We're still going
if not result:
db.close_old_connections()
@@ -380,8 +380,8 @@ def worker(task_queue, result_queue, timer, timeout=Conf.TIMEOUT):
result = (res, True)
except Exception as e:
result = ('{}'.format(e), False)
if rollbar:
rollbar.report_exc_info()
if error_reporter:
error_reporter.report()
# Process result
task['result'] = result[0]
task['success'] = result[1]