<commit_before># ----------------------------------------------------------------------------------------

require_dependency 'rocketchat/rc_database.rb'

# ----------------------------------------------------------------------------------------

module ::Jobs

    # ------------------------------------------------------------------------------------

    class RocketChatSsoBusyUpdate < Jobs::Scheduled
        every 1.minutes

        def execute( args )

            # open the Rocket.Chat database user collection

            rcdb_client = RocketChat.RCDB_Client()

            if rcdb_client.nil?
                Rails.logger.error 'ROCKETCHAT-SSO | RC DB not accessible?'
                return
            end

            rcdb_users_collection = RocketChat.RCDB_Users_Collection( rcdb_client )

            if rcdb_users_collection.nil?
                Rails.logger.error 'ROCKETCHAT-SSO | RC DB users collection missing?'
                rcdb_client.close()
                return
            end

            # retrieve the active (online) Rocket.Chat users

            rcdb_online = RocketChatSso.RDCB_Find_Online_Users( rcdb_users_collection )

            # build an array of the usernames

            users_online_now = []

            if not rcdb_online.nil?

                rcdb_active_users.each do |user|
                    users_online_now.push( user[ 'username' ] )
                end

                rcdb_online.close_query()

            end

            # done with the database connection client

            rcdb_client.close()

            # and publish the results

            MessageBus.publish( '/rocketchat-sso-users-online', users_online_now.as_json )

        end

    end

    # ------------------------------------------------------------------------------------

end

<commit_msg>Fix dependency<commit_after># ----------------------------------------------------------------------------------------

require_dependency 'rc_database.rb'

# ----------------------------------------------------------------------------------------

module ::Jobs

    # ------------------------------------------------------------------------------------

    class RocketChatSsoBusyUpdate < Jobs::Scheduled
        every 1.minutes

        def execute( args )

            # open the Rocket.Chat database user collection

            rcdb_client = RocketChat.RCDB_Client()

            if rcdb_client.nil?
                Rails.logger.error 'ROCKETCHAT-SSO | RC DB not accessible?'
                return
            end

            rcdb_users_collection = RocketChat.RCDB_Users_Collection( rcdb_client )

            if rcdb_users_collection.nil?
                Rails.logger.error 'ROCKETCHAT-SSO | RC DB users collection missing?'
                rcdb_client.close()
                return
            end

            # retrieve the active (online) Rocket.Chat users

            rcdb_online = RocketChatSso.RDCB_Find_Online_Users( rcdb_users_collection )

            # build an array of the usernames

            users_online_now = []

            if not rcdb_online.nil?

                rcdb_active_users.each do |user|
                    users_online_now.push( user[ 'username' ] )
                end

                rcdb_online.close_query()

            end

            # done with the database connection client

            rcdb_client.close()

            # and publish the results

            MessageBus.publish( '/rocketchat-sso-users-online', users_online_now.as_json )

        end

    end

    # ------------------------------------------------------------------------------------

end


{'fraction_non_alphanumeric': 0.23983516483516484, 'fraction_numerical': 0.0005494505494505495, 'mean_word_length': 1.0016492578339746, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3490243', 'n_tokens_mistral': 874, 'n_tokens_neox': 832, 'n_words': 183}