You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
live_config_update restarts the bot immediately on config change.
Proposed Behavior
Options for live_config_update to not interrupt pokemon_catch_worker or pokemon_optimizer.
Optional since some might want to interrupt the optimizer if they catch it doing something unwanted.
Alternative Proposal
Store the currently running task and continue from that task on restart.
This seems more difficult for me and would still interrupt a catch, but restarting the optimizer is definitely desirable.
Potential Code
To get the first proposed behavior, in pokecli.py I added...
from pokemongo_bot.worker_result import WorkerResult
and changed line 155 to...
if config.live_config_update_enabled and config_changed() and worker.work() != WorkerResult.RUNNING:
but this gives
File "pokecli.py", line 796, in <module>
main()
File "pokecli.py", line 155, in main
if config.live_config_update_enabled and config_changed() and worker.work() != WorkerResult.RUNNING:
NameError: global name 'worker' is not defined
and certainly doesn't give you any options.
The text was updated successfully, but these errors were encountered:
RedViper9
changed the title
[Feature Request] Optional non-interupt for live_confgi_update
[Feature Request] Optional non-interupt for live_config_update
Sep 2, 2016
Actually it should finish catching the pokemon before restarting the bot due to config change, because the part which checks for config change is after the tick() method. I've tried it numerous times on my mac.
Can you try this:
Modify your config, but don't save
Have your terminal at the side, watching for pokemon encounter
Once you encounter a pokemon, save the config
See that it should continue to catch the pokemon before restarting the bot.
This makes sense and you are quite right. The config update does not interrupt a catch.
I must have assumed that it does since I saw it interrupt the optimizer, but since that's likely the preferred behavior, no change needed.
Current Behavior
live_config_update restarts the bot immediately on config change.
Proposed Behavior
Options for live_config_update to not interrupt pokemon_catch_worker or pokemon_optimizer.
Optional since some might want to interrupt the optimizer if they catch it doing something unwanted.
Alternative Proposal
Store the currently running task and continue from that task on restart.
This seems more difficult for me and would still interrupt a catch, but restarting the optimizer is definitely desirable.
Potential Code
To get the first proposed behavior, in pokecli.py I added...
and changed line 155 to...
but this gives
and certainly doesn't give you any options.
The text was updated successfully, but these errors were encountered: