jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
Revert "[IMPR] Wait for _putthread is done in BaseBot.exit()"

This reverts commit 87cfda61cd98c9a0af73ed814a789e0dde266e8f.

Reason for revert: async put is blocked after this patch
and no page is written to site. Queue increases up to ist
limit and blocks after that.

Change-Id: I999f39da384ba754e045c60309d3737f0e7c3309
---
M pywikibot/bot.py
1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index c111c31..1dc7855 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -1289,36 +1289,28 @@
May be overridden by subclasses.
"""
self.teardown()
- if hasattr(self, '_start_ts'):
- read_delta = pywikibot.Timestamp.now() - self._start_ts
- read_seconds = int(read_delta.total_seconds())
-
- if pywikibot._putthread.is_alive():
- pywikibot._flush()
-
pywikibot.output('\n{} pages read'
'\n{} pages written'
'\n{} pages skipped'
.format(self._treat_counter,
self._save_counter,
self._skip_counter))
-
if hasattr(self, '_start_ts'):
- write_delta = pywikibot.Timestamp.now() - self._start_ts
- write_seconds = int(write_delta.total_seconds())
- if write_delta.days:
+ delta = (pywikibot.Timestamp.now() - self._start_ts)
+ seconds = int(delta.total_seconds())
+ if delta.days:
pywikibot.output(
'Execution time: {d.days} days, {d.seconds} seconds'
- .format(d=write_delta))
+ .format(d=delta))
else:
pywikibot.output('Execution time: {} seconds'
- .format(write_delta.seconds))
+ .format(delta.seconds))
if self._treat_counter:
pywikibot.output('Read operation time: {:.1f} seconds'
- .format(read_seconds / self._treat_counter))
+ .format(seconds / self._treat_counter))
if self._save_counter:
pywikibot.output('Write operation time: {:.1f} seconds'
- .format(write_seconds / self._save_counter))
+ .format(seconds / self._save_counter))

# exc_info contains exception from self.run() while terminating
exc_info = sys.exc_info()

To view, visit change 608834. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I999f39da384ba754e045c60309d3737f0e7c3309
Gerrit-Change-Number: 608834
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged