Closed Bug 1059801 Opened 10 years ago Closed 10 years ago

Newly seen machines don't have a valid timestamp set by add_machine()

Categories

(Tree Management :: Treeherder, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

Details

Attachments

(1 file)

{
    def add_machine(self, machine_name, timestamp):
        """
        Add machine name and timestamp. There are two timestamps stored in
        the database for each machine, one associated with the first time
        the machine is seen and another that acts as a heartbeat for the
        machine.
        """

        if machine_name not in self.machine_name_lookup:

            machine_name = machine_name or 'unknown'
            timestame = timestamp or time.time()

            machine_name = machine_name[0:50]

            self.machine_name_lookup.add(machine_name)

            # Placeholders for the INSERT/SELECT SQL query
            self.machine_name_placeholders.append(
                # machine_name, first_timestamp, last_timestamp,
                # machine_name
                [ machine_name, timestamp, timestamp, machine_name ]
                )
}

Due to 'timestame' rather than 'timestamp'.
Git log says jeads wins the review roulette :-)
Attachment #8480590 - Flags: review?(jeads)
Priority: P1 → P2
Comment on attachment 8480590 [details] [diff] [review]
Fix fallback for when no timestamp is passed to add_machine()

Review of attachment 8480590 [details] [diff] [review]:
-----------------------------------------------------------------

Nice typo catch.
Attachment #8480590 - Flags: review?(jeads) → review+
Comment on attachment 8480590 [details] [diff] [review]
Fix fallback for when no timestamp is passed to add_machine()

https://github.com/mozilla/treeherder-service/commit/d6e3cd8ed37d6a6ec26de4c2629bcadf7659b213
Attachment #8480590 - Flags: checkin+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: