Merge branch 'master' into new_httpd
commit
5061973b9b
|
@ -180,8 +180,7 @@ SYMBOL: sources-changed?
|
||||||
[ t sources-changed? set-global ] "vocabs.loader" add-init-hook
|
[ t sources-changed? set-global ] "vocabs.loader" add-init-hook
|
||||||
|
|
||||||
: refresh-all ( -- )
|
: refresh-all ( -- )
|
||||||
sources-changed? get-global
|
"" refresh f sources-changed? set-global ;
|
||||||
[ "" refresh f sources-changed? set-global ] when ;
|
|
||||||
|
|
||||||
GENERIC: (load-vocab) ( name -- vocab )
|
GENERIC: (load-vocab) ( name -- vocab )
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
IN: alarms.tests
|
||||||
|
USING: alarms kernel calendar sequences tools.test threads
|
||||||
|
concurrency.count-downs ;
|
||||||
|
|
||||||
|
[ ] [
|
||||||
|
1 <count-down>
|
||||||
|
{ f } clone 2dup
|
||||||
|
[ first cancel-alarm count-down ] 2curry 1 seconds later
|
||||||
|
swap set-first
|
||||||
|
await
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
[ ] [
|
||||||
|
[
|
||||||
|
[ resume ] curry instant later drop
|
||||||
|
] "test" suspend drop
|
||||||
|
] unit-test
|
|
@ -37,8 +37,8 @@ SYMBOL: alarm-thread
|
||||||
register-alarm ;
|
register-alarm ;
|
||||||
|
|
||||||
: call-alarm ( alarm -- )
|
: call-alarm ( alarm -- )
|
||||||
dup alarm-quot try
|
|
||||||
dup alarm-entry box> drop
|
dup alarm-entry box> drop
|
||||||
|
dup alarm-quot try
|
||||||
dup alarm-interval [ reschedule-alarm ] [ drop ] if ;
|
dup alarm-interval [ reschedule-alarm ] [ drop ] if ;
|
||||||
|
|
||||||
: (trigger-alarms) ( alarms now -- )
|
: (trigger-alarms) ( alarms now -- )
|
||||||
|
@ -46,8 +46,7 @@ SYMBOL: alarm-thread
|
||||||
2drop
|
2drop
|
||||||
] [
|
] [
|
||||||
over heap-peek drop over alarm-expired? [
|
over heap-peek drop over alarm-expired? [
|
||||||
over heap-pop drop call-alarm
|
over heap-pop drop call-alarm (trigger-alarms)
|
||||||
(trigger-alarms)
|
|
||||||
] [
|
] [
|
||||||
2drop
|
2drop
|
||||||
] if
|
] if
|
||||||
|
|
|
@ -8,7 +8,7 @@ SYMBOL: upload-images-destination
|
||||||
|
|
||||||
: destination ( -- dest )
|
: destination ( -- dest )
|
||||||
upload-images-destination get
|
upload-images-destination get
|
||||||
"slava@/var/www/factorcode.org/w/images/latest/"
|
"slava@/var/www/factorcode.org/newsite/images/latest/"
|
||||||
or ;
|
or ;
|
||||||
|
|
||||||
: checksums "checksums.txt" temp-file ;
|
: checksums "checksums.txt" temp-file ;
|
||||||
|
|
Loading…
Reference in New Issue