<commit_before>echo(on),
case Args of
    [UserArgs] ->
        User = list_to_binary(UserArgs),
        io:format("User:~p~n", [User]),
        UserReses = ejabberd_sm:get_user_resources(User, <<"easemob.com">>),
        lists:foreach(fun(Res) ->
                              case ejabberd_sm:get_session(User, <<"easemob.com">>, Res) of
                                  [{_, _, _, _, undefined, _}] ->
                                      USR = {User, <<"easemob.com">>, Res},
                                      ejabberd_store:store_rpc(all, mnesia, activity,
                                                               [ejabberd_store:op_by_consistency(),
                                                                fun mnesia:delete/1,
                                                                [{session, USR}], mnesia_frag]);
                                  _ ->
                                      ignore
                              end
                      end, UserReses);
    _ ->
        io:format("args error: ~p ~n",[Args])
end,
ok.<commit_msg>fix bug of clean codis session<commit_after>echo(on),
case Args of
    [UserArgs] ->
        User = list_to_binary(UserArgs),
        io:format("User:~p~n", [User]),
        UserReses = ejabberd_sm:get_user_resources(User, <<"easemob.com">>),
        lists:foreach(fun(Res) ->
                              case ejabberd_sm:get_session(User, <<"easemob.com">>, Res) of
                                  [{_, _, _, _, undefined, _}] ->
                                      USR = {User, <<"easemob.com">>, Res},
                                      ejabberd_store:store_rpc(all, mnesia, activity,
                                                               [ejabberd_store:op_by_consistency(),
                                                                fun mnesia:delete/1,
                                                                [{session, USR}], mnesia_frag]),
				      mod_session_redis:logout_session_redis(<<"easemob.com">>, User, Res),
				      io:format("clean undefined session:~p ~n", [Res]);
                                  _ ->
                                      ignore
                              end
                      end, UserReses);
    _ ->
        io:format("args error: ~p ~n",[Args])
end,
ok.
{'fraction_non_alphanumeric': 0.11670973298880276, 'fraction_numerical': 0.0008613264427217916, 'mean_word_length': 0.9803921568627451, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2192673', 'n_tokens_mistral': 615, 'n_tokens_neox': 587, 'n_words': 96}