should pulsar.api.send('arbiter', 'stop') be enough to exit the application?

13 views
Skip to first unread message

Timothee Besset

unread,
Mar 21, 2019, 7:04:49 PM3/21/19
to python-pulsar
Hello,

I need to trigger application exit, and having some difficulty making it work. Should I be able to issue pulsar.api.send('arbiter', 'stop') and expect the application to exit?

Right now this is what I'm seeing when attempting to use pulsar.api.send('arbiter', 'stop'):

18:03:09 [p=72056, t=49804, DEBUG, arbiter] Closing 2 actors
Traceback (most recent call last):
  File "app.py", line 102, in <module>
    main()
  File "app.py", line 98, in main
    pulsar.api.arbiter(cfg=cfg, start=app.onstart_wrap).start()
  File "C:\Python36\lib\site-packages\pulsar\async\actor.py", line 282, in start
    self._run()
  File "C:\Python36\lib\site-packages\pulsar\async\actor.py", line 439, in _run
    return self.stop()
  File "C:\Python36\lib\site-packages\pulsar\async\actor.py", line 319, in stop
    return self._concurrency.stop(self, exc, exit_code)
  File "C:\Python36\lib\site-packages\pulsar\async\concurrency.py", line 206, in stop
    actor.event('stopping').fire()
  File "C:\Python36\lib\site-packages\pulsar\utils\pylib\events.py", line 91, in fire
    hnd(o)
  File "C:\Python36\lib\site-packages\pulsar\async\monitor.py", line 427, in _stop_monitor
    worker.stop(sig)
  File "app.py", line 78, in on_actor_stop
    return fn(*kw)
  File "C:\Python36\lib\site-packages\pulsar\async\proxy.py", line 185, in stop
    self.impl.kill(sig)
  File "C:\Python36\lib\site-packages\pulsar\async\concurrency.py", line 375, in kill
    system.kill(self.pid, sig)
  File "C:\Python36\lib\site-packages\pulsar\utils\system\windowssystem.py", line 33, in kill
    os.kill(pid, sig)
PermissionError: [WinError 5] Access is denied

Cheers,
TTimo

Reply all
Reply to author
Forward
0 new messages