PolicyStat / jobtastic

Make your user-responsive long-running Celery jobs totally awesomer.
http://policystat.github.com/jobtastic/
MIT License
644 stars 61 forks source link

Stacktrace when using psutil 3.0.1 #47

Open kylegibson opened 9 years ago

kylegibson commented 9 years ago

get_memory_info is just memory_info in psutil 3.0.1:

http://pythonhosted.org/psutil/index.html#psutil.Process.memory_info

  File "/home/ubuntu/virtualenvs/pstat_ticket_unittest_1/lib/python2.6/site-packages/jobtastic/task.py", line 183, in delay_or_fail
    return self.apply_async(args=args, kwargs=kwargs)
  File "/home/ubuntu/virtualenvs/pstat_ticket_unittest_1/lib/python2.6/site-packages/jobtastic/task.py", line 254, in apply_async
    **options
  File "/home/ubuntu/virtualenvs/pstat_ticket_unittest_1/lib/python2.6/site-packages/celery/app/task/__init__.py", line 445, in apply_async
    return self.apply(args, kwargs, task_id=task_id, **options)
  File "/home/ubuntu/virtualenvs/pstat_ticket_unittest_1/lib/python2.6/site-packages/celery/app/task/__init__.py", line 601, in apply
    request=request, propagate=throw)
  File "/home/ubuntu/virtualenvs/pstat_ticket_unittest_1/lib/python2.6/site-packages/celery/execute/trace.py", line 248, in eager_trace_task
    uuid, args, kwargs, request)
  File "/home/ubuntu/virtualenvs/pstat_ticket_unittest_1/lib/python2.6/site-packages/celery/execute/trace.py", line 181, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/ubuntu/virtualenvs/pstat_ticket_unittest_1/lib/python2.6/site-packages/jobtastic/task.py", line 358, in run
    begining_memory_usage = self._get_memory_usage()
  File "/home/ubuntu/virtualenvs/pstat_ticket_unittest_1/lib/python2.6/site-packages/jobtastic/task.py", line 448, in _get_memory_usage
    usage = current_process.get_memory_info()
AttributeError: 'Process' object has no attribute 'get_memory_info'