add an account-name field to site-watcher
parent
87997cc0d2
commit
33914c62cb
|
@ -5,14 +5,15 @@ io.directories io.files.temp kernel io.streams.string calendar
|
|||
debugger combinators.smart sequences ;
|
||||
IN: site-watcher.db
|
||||
|
||||
TUPLE: account account-id email ;
|
||||
TUPLE: account account-id account-name email ;
|
||||
|
||||
: <account> ( email -- account )
|
||||
: <account> ( account-name -- account )
|
||||
account new
|
||||
swap >>email ;
|
||||
swap >>account-name ;
|
||||
|
||||
account "ACCOUNT" {
|
||||
{ "account-id" "ACCOUNT_ID" +db-assigned-id+ }
|
||||
{ "account-name" "ACCOUNT_NAME" VARCHAR }
|
||||
{ "email" "EMAIL" VARCHAR }
|
||||
} define-persistent
|
||||
|
||||
|
@ -74,7 +75,7 @@ TUPLE: reporting-site email url up? changed? last-up? error last-error ;
|
|||
dup t >>up? insert-tuple
|
||||
] unless ;
|
||||
|
||||
: insert-account ( email -- ) <account> insert-tuple ;
|
||||
: insert-account ( account-name -- ) <account> insert-tuple ;
|
||||
|
||||
: find-sites ( -- seq ) f <site> select-tuples ;
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
! Copyright (C) 2009 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: db.tuples locals site-watcher site-watcher.db
|
||||
site-watcher.private kernel ;
|
||||
site-watcher.private kernel db io.directories io.files.temp
|
||||
continuations ;
|
||||
IN: site-watcher.tests
|
||||
|
||||
: site-watcher-path ( -- path ) "site-watcher.db" temp-file ; inline
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
USING: accessors alarms arrays calendar combinators
|
||||
combinators.smart continuations debugger http.client
|
||||
init io.streams.string kernel locals math math.parser
|
||||
namespaces sequences site-watcher.db smtp ;
|
||||
namespaces sequences site-watcher.db site-watcher.db.private smtp ;
|
||||
IN: site-watcher
|
||||
|
||||
SYMBOL: site-watcher-from
|
||||
|
|
Loading…
Reference in New Issue