Issues

Issue #37 invalid

Exception in thread Thread-1

Jesid Andrey Durango Isaza
created an issue

Hi, I'm having this exception with this (this is a little example to reproduce the exception)

def showMessage():
        print "Show this message"

sh = Scheduler()
sh.start()
sh.add_interval_job(showMessage, seconds=6, name='showMessage')

Only execute the job one time and the output is:

Show this message
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ubuntu/projects/env/local/lib/python2.7/site-packages/apscheduler/threadpool.py", line 91, in _run_jobs
    self._threads.remove(currentThread())
KeyError: <_MainThread(MainThread, started 140260121077504)>

Thanks

Comments (5)

  1. Jesid Andrey Durango Isaza reporter

    I started the server with this line and the error occured:

    gunicorn --workers=1 --worker-class=eventlet --bind ip:port --log-file=/log/to/file.log -t 120 runapp:application &
    

    apparently is an incompatibility, I start the server now thus

    gunicorn --workers=1 --bind ip:port --log-file=/log/to/file.log -t 120 --debug --log-level debug runapp:application &
    
  2. Alex Grönholm repo owner

    What error? Please paste the error. That said, if OS level threads are disabled, expect APScheduler to display odd behavior, because it relies on threads to work.

  3. Log in to comment