Skip to content

Commit

Permalink
feat: restart atx agent
Browse files Browse the repository at this point in the history
  • Loading branch information
mastrolube committed Feb 19, 2024
1 parent a160b1a commit 2cacdad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions GramAddict/core/bot_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
open_instagram,
pre_post_script,
print_telegram_reports,
restart_atx_agent,
save_crash,
set_time_delta,
show_ending_conditions,
Expand Down Expand Up @@ -119,6 +120,8 @@ def start_bot(**kwargs):
if not inside_working_hours:
wait_for_next_session(time_left, session_state, sessions, device)
pre_post_script(path=configs.args.pre_script)
if configs.args.restart_atx_agent:
restart_atx_agent(device)
get_device_info(device)
session_state = SessionState(configs)
session_state.set_limits_session()
Expand Down
5 changes: 5 additions & 0 deletions GramAddict/plugins/core_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ def __init__(self):
"help": "kill atx-agent when the script ends",
"action": "store_true",
},
{
"arg": "--restart-atx-agent",
"help": "restart atx-agent before the script starts",
"action": "store_true",
},
{
"arg": "--interact",
"nargs": "+",
Expand Down
1 change: 1 addition & 0 deletions config-examples/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ speed-multiplier: 1
debug: false
close-apps: false
kill-atx-agent: false
restart-atx-agent: false
disable-block-detection: false
disable-filters: false
dont-type: false
Expand Down

0 comments on commit 2cacdad

Please sign in to comment.