This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func writeHeap() { | |
log.Info("Writing profiles") | |
resp, err := http.Get("http://localhost:8024/debug/pprof/heap") | |
if err != nil { | |
log.Infof("Failed at http.Get error: %+v", err) | |
return | |
} | |
defer resp.Body.Close() | |
body, err := ioutil.ReadAll(resp.Body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@uc_schema_mixin | |
class User(UcDocument, BaseUcFlaskUserMixin): | |
email = LowercasingEmailField(unique=True) | |
password = StringField(max_length=255) | |
active = BooleanField(default=True) | |
confirmed_at = DateTimeField() | |
last_login_at = DateTimeField() | |
current_login_at = DateTimeField() | |
# The last time when this use was active. This is stored with millis accuracy but is | |
# computed with a lower accuracy (currently day). |