Пример #1
0
    def update_last_visit(self, current_time):
        from admintools import apply_updates

        apply_updates(self)

        prev_visit = LastModified.get(self._fullname, "Visit")
        if prev_visit and current_time - prev_visit < timedelta(days=1):
            return

        g.log.debug("Updating last visit for %s from %s to %s" % (self.name, prev_visit, current_time))

        LastModified.touch(self._fullname, "Visit")
Пример #2
0
    def update_last_visit(self, current_time):
        from admintools import apply_updates

        apply_updates(self)

        prev_visit = LastModified.get(self._fullname, "Visit")
        if prev_visit and current_time - prev_visit < timedelta(days=1):
            return

        g.log.debug("Updating last visit for %s from %s to %s" %
                    (self.name, prev_visit, current_time))

        LastModified.touch(self._fullname, "Visit")
Пример #3
0
    def update_last_visit(self, current_time):
        from admintools import apply_updates

        apply_updates(self)

        #prev_visit = getattr(self, 'last_visit', None)
        prev_visit = last_visit(self)

        if prev_visit and current_time - prev_visit < timedelta(1):
            return

        g.log.debug ("Updating last visit for %s from %s to %s" %
                    (self.name, prev_visit, current_time))
        set_last_visit(self)
Пример #4
0
    def update_last_visit(self, current_time):
        from admintools import apply_updates

        apply_updates(self)

        #prev_visit = getattr(self, 'last_visit', None)
        prev_visit = last_visit(self)

        if prev_visit and current_time - prev_visit < timedelta(1):
            return

        g.log.debug("Updating last visit for %s from %s to %s" %
                    (self.name, prev_visit, current_time))
        set_last_visit(self)
Пример #5
0
    def update_last_visit(self, current_time):
        from admintools import apply_updates

        apply_updates(self)

        prev_visit = getattr(self, 'last_visit', None)

        if prev_visit and current_time - prev_visit < timedelta(0, 3600):
            return

        g.log.debug ("Updating last visit for %s" % self.name)
        self.last_visit = current_time

        self._commit()
Пример #6
0
    def update_last_visit(self, current_time):
        from admintools import apply_updates

        apply_updates(self)

        prev_visit = getattr(self, 'last_visit', None)

        if prev_visit and current_time - prev_visit < timedelta(0, 3600):
            return

        g.log.debug("Updating last visit for %s" % self.name)
        self.last_visit = current_time

        self._commit()
Пример #7
0
    def update_last_visit(self, current_time):
        from admintools import apply_updates

        timer = g.stats.get_timer("account.update_last_visit")
        timer.start()

        apply_updates(self, timer)

        prev_visit = LastModified.get(self._fullname, "Visit")
        timer.intermediate("get_last_modified")

        if prev_visit and current_time - prev_visit < timedelta(days=1):
            timer.intermediate("set_last_modified.noop")
            timer.stop()
            return

        LastModified.touch(self._fullname, "Visit")
        timer.intermediate("set_last_modified.done")
        timer.stop()
Пример #8
0
    def update_last_visit(self, current_time):
        from admintools import apply_updates

        timer = g.stats.get_timer("account.update_last_visit")
        timer.start()

        apply_updates(self, timer)

        prev_visit = LastModified.get(self._fullname, "Visit")
        timer.intermediate("get_last_modified")

        if prev_visit and current_time - prev_visit < timedelta(days=1):
            timer.intermediate("set_last_modified.noop")
            timer.stop()
            return

        LastModified.touch(self._fullname, "Visit")
        timer.intermediate("set_last_modified.done")
        timer.stop()