I have a job I run under cron on toolforge: > toolforge jobs run fac-summary-bot --command $HOME/fac-tools/toolforge/bot.sh > --image python3.11 --schedule "*/15 * * * *" --timeout 300
It runs fine, but what I don't understand is that it logs output to fac-summary-bot.out that looks like: > https://prosesize.toolforge.org/api/en.wikipedia.org/Mike%20Enzi > {'prose_size': 23337, 'word_count': 3800, 'references': 5976} Which looks like a request/response pair requests (or urllib) would have logged from: > def prose_size(self) -> int: > "Return the readable prose size in words." > url = "https://prosesize.toolforge.org/api/html" > headers = { > "user-agent": f"fac_tools ({argv[0]})", > "content-type": "test/html", > } > r = requests.post(url, headers=headers, data=self.parsoid_html) > r.raise_for_status() > data = r.json() > return data["word_count"] except that I never turned on logging for these libraries. I've verified that these have no logging configured by dumping the config with logging_tree <https://pypi.org/project/logging-tree/>: > o<--"requests" > | Level NOTSET so inherits level WARNING > | Handler <NullHandler (NOTSET)> > o<--"urllib3" > Level NOTSET so inherits level WARNING > Handler <NullHandler (NOTSET)> I cannot reproduce this outside the toolforge environment, nor can I reproduce it when I shell into the krb backend and run it manually. As far as I can tell, it only happens when run by cron under toolforge. Anybody have a clue what might be going on?
_______________________________________________ Cloud mailing list -- [email protected] List information: https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/
