MCPcopy Create free account
hub / github.com/ActiveState/code / update

Method update

recipes/Python/577638_File_Share_Messenger_25/recipe-577638.py:1460–1469  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1458 self.__writer.write(text)
1459
1460 def update(self):
1461 # Update the directory monitor once a second.
1462 self.after(1000, self.update)
1463 self.__monitor.update(self.__messages.update)
1464 # For each message, show those less than a day old.
1465 utcnow = datetime.datetime.utcnow()
1466 for message in self.__messages.get_messages():
1467 hours = (utcnow - message.time).total_seconds() / 3600
1468 if hours < SETTINGS.message_cutoff and self.allowed(message):
1469 self.display(message)
1470
1471 def allowed(self, message):
1472 # If there is no text, it is not allowed.

Callers 7

update_searchMethod · 0.45
sync_nodesMethod · 0.45
patch_childrenMethod · 0.45
main_loopFunction · 0.45
updateMethod · 0.45
updateMethod · 0.45
main_loopMethod · 0.45

Calls 4

allowedMethod · 0.95
displayMethod · 0.95
afterMethod · 0.45
get_messagesMethod · 0.45

Tested by

no test coverage detected