This commit is contained in:
Mickael 2019-08-17 18:31:31 +02:00
parent 7cc56582ca
commit 9fe47559a7
2 changed files with 6 additions and 2 deletions

View file

@ -18,7 +18,9 @@ def main():
recent_date = datetime.now() - monthdelta()
rocket = RocketChat(cfg.rocket['user'], cfg.rocket['password'], auth_token=cfg.rocket['auth_token'], user_id=cfg.rocket['user_id'], server_url=cfg.rocket['server'])
rocket = RocketChat(None, None, auth_token=cfg.rocket['auth_token'], user_id=cfg.rocket['user_id'], server_url=cfg.rocket['server'])
print("Check users")
users = getAllUsers(rocket)
crapauds_total = len(users)
for user in users:
@ -27,6 +29,7 @@ def main():
if user_date > recent_date:
crapauds_recent += 1
print("Check channels")
channels = getAllChannels(rocket)
channels_total = len(channels)
@ -37,6 +40,7 @@ def main():
if channel_date > recent_date:
channels_recent += 1
channels_list.append(channel["name"])
print("Check messages for channels {}".format(channel['name']))
messages = rocket.channels_history(channel["_id"], oldest= recent_date, count= 10000).json()
messages_recent += len(messages["messages"])

View file

@ -1 +1 @@
{"crapauds": {"total": 2363, "recent": 84}, "canaux": {"total": 176, "recent": 102, "liste": ["accueil", "activite-et-travail", "agenda", "animation-crapauds", "aquaponie", "audio-visuel-libre", "bnb-bonheur-national-brut", "bresil", "burn-out", "cercle-autonomie-energetique", "cercle-blockchain-crypto", "cercle-collaboratif", "cercle-des-arts", "cercle-d\u00e9mocratie", "cercle-education", "cercle-game-changers", "cercle-generation-2050", "cercle-intergenerationnel", "cercle-neurodiversit\u00e9", "cercle-permaculture", "cercle-sante", "changer-de-paradigme", "cnv", "cohorte-2607", "cohorte-34", "cohorte-barcelone", "cohorte-belgique", "cohorte-bretagne", "cohorte-centre", "cohorte-geek", "cohorte-grece", "cohorte-grenoble", "cohorte-hdf", "cohorte-ile-de-france", "cohorte-loire", "cohorte-lyon-st-etienne", "cohorte-normandie", "cohorte-paca", "cohorte-scientifique", "cohorte-sud-ouest", "cohorte-suisse", "crapomobile", "desobeissance-civile", "dessins-citoyens-collectifs-booderies", "developpement-personnel", "doughnut-economics", "ecologie-biodiversite", "economie-connaissance", "ecovillages-ecoquartiers", "education-populaire", "emancipation-outre-mer", "emmaus-pau-lescar", "empowerment", "energie", "faire-avancer-le-schmilblick-ecologique", "foret_bleue", "fou-a-lier", "general", "geopolitique", "gestion-de-l-eau", "gilets-jaunes", "how-to-low-tech", "info-desintox", "intelligence-artificielle", "intelligence-collective", "jeux-inde-1", "journee-univ-j-verne-nantes-4-juil-2019", "la-bascule-lobby-citoyen", "langage-vrai-anti-glossaire", "le-led", "lhomme-et-la-terre", "libre", "lobbying", "logiciel-libre", "meditation", "mutuelle-sociale-solidaire", "nature-simplicite-bienveillance", "no-gafam", "open-hardware", "p-2-p-dat", "philosophie", "pratiques-artistiques", "projet-cand-alterincub-centre", "psychologie-neurologie", "radio-crapaud", "recherches-biologie", "recueil-temoignages", "reflexion-sur-l-argent", "rencontre-crapaud-kangourou", "right-to-repair", "semourais", "siteweb", "sociologie-de-l-effondrement", "solucracy", "survivalismes-et-resiliences", "terre-de-convergence", "tiers-lieux-apprenant", "transhumanisme-et-eugenisme", "tsunamis", "tvp-et-ebr", "wiki-crapaud-fou", "zero-dechet"]}, "messages": {"total": 185202, "recent": 12792}}
{"crapauds": {"total": 2363, "recent": 84}, "canaux": {"total": 176, "recent": 102, "liste": ["accueil", "activite-et-travail", "agenda", "animation-crapauds", "aquaponie", "audio-visuel-libre", "bnb-bonheur-national-brut", "bresil", "burn-out", "cercle-autonomie-energetique", "cercle-blockchain-crypto", "cercle-collaboratif", "cercle-des-arts", "cercle-d\u00e9mocratie", "cercle-education", "cercle-game-changers", "cercle-generation-2050", "cercle-intergenerationnel", "cercle-neurodiversit\u00e9", "cercle-permaculture", "cercle-sante", "changer-de-paradigme", "cnv", "cohorte-2607", "cohorte-34", "cohorte-barcelone", "cohorte-belgique", "cohorte-bretagne", "cohorte-centre", "cohorte-geek", "cohorte-grece", "cohorte-grenoble", "cohorte-hdf", "cohorte-ile-de-france", "cohorte-loire", "cohorte-lyon-st-etienne", "cohorte-normandie", "cohorte-paca", "cohorte-scientifique", "cohorte-sud-ouest", "cohorte-suisse", "crapomobile", "desobeissance-civile", "dessins-citoyens-collectifs-booderies", "developpement-personnel", "doughnut-economics", "ecologie-biodiversite", "economie-connaissance", "ecovillages-ecoquartiers", "education-populaire", "emancipation-outre-mer", "emmaus-pau-lescar", "empowerment", "energie", "faire-avancer-le-schmilblick-ecologique", "foret_bleue", "fou-a-lier", "general", "geopolitique", "gestion-de-l-eau", "gilets-jaunes", "how-to-low-tech", "info-desintox", "intelligence-artificielle", "intelligence-collective", "jeux-inde-1", "journee-univ-j-verne-nantes-4-juil-2019", "la-bascule-lobby-citoyen", "langage-vrai-anti-glossaire", "le-led", "lhomme-et-la-terre", "libre", "lobbying", "logiciel-libre", "meditation", "mutuelle-sociale-solidaire", "nature-simplicite-bienveillance", "no-gafam", "open-hardware", "p-2-p-dat", "philosophie", "pratiques-artistiques", "projet-cand-alterincub-centre", "psychologie-neurologie", "radio-crapaud", "recherches-biologie", "recueil-temoignages", "reflexion-sur-l-argent", "rencontre-crapaud-kangourou", "right-to-repair", "semourais", "siteweb", "sociologie-de-l-effondrement", "solucracy", "survivalismes-et-resiliences", "terre-de-convergence", "tiers-lieux-apprenant", "transhumanisme-et-eugenisme", "tsunamis", "tvp-et-ebr", "wiki-crapaud-fou", "zero-dechet"]}, "messages": {"total": 185204, "recent": 12791}}