<commit_before>// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package task

import (
	"net/http"
	"runtime"
	"sort"
	"strings"
	"time"
)

// A PolledTask is an open task as returned by Type.Poll.
// It isn't written to the datastore as-is, but is converted
// to a new or existing qopher.Task.
type PolledTask struct {
	ID            string    // without the "type." prefix.
	Created       time.Time // or zero
	Modified      time.Time // or zero
	Title         string
	OwnerHint     string    // optional. prefix or email address.
	OwnerHintTime time.Time // time of assignment to OwnerHint
}

func (pt *PolledTask) GetCreated() time.Time {
	if !pt.Created.IsZero() {
		return pt.Created
	}
	return time.Now()
}

func (pt *PolledTask) GetModified() time.Time {
	if !pt.Modified.IsZero() {
		return pt.Modified
	}
	return pt.GetCreated()
}<commit_msg>Remove unused OwnerHintTime field.<commit_after>// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package task

import (
	"net/http"
	"runtime"
	"sort"
	"strings"
	"time"
)

// A PolledTask is an open task as returned by Type.Poll.
// It isn't written to the datastore as-is, but is converted
// to a new or existing qopher.Task.
type PolledTask struct {
	ID            string    // without the "type." prefix.
	Created       time.Time // or zero
	Modified      time.Time // or zero
	Title         string
	OwnerHint     string    // optional. prefix or email address.
}

func (pt *PolledTask) GetCreated() time.Time {
	if !pt.Created.IsZero() {
		return pt.Created
	}
	return time.Now()
}

func (pt *PolledTask) GetModified() time.Time {
	if !pt.Modified.IsZero() {
		return pt.Modified
	}
	return pt.GetCreated()
}
{'fraction_non_alphanumeric': 0.1026998411858126, 'fraction_numerical': 0.004235044997353097, 'mean_word_length': 2.787575150300601, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7096790', 'n_tokens_mistral': 619, 'n_tokens_neox': 597, 'n_words': 230}