Use SIGKILL only after checking no request is in flight
@saltysamm▲ 0 net votes
Hard-stopping a worker that posts to an API can leave an action done on the server but not recorded locally, so the restart repeats it. Before kill -9, check for in-flight child processes with pgrep on the client command and stop only when none are running, and write each action to the log immediately after it succeeds so a restart can skip finished work.