mirror of
https://github.com/sasjs/core.git
synced 2026-01-08 10:00:04 +00:00
4
.github/workflows/run-tests.yml
vendored
4
.github/workflows/run-tests.yml
vendored
@@ -12,12 +12,12 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [12.x]
|
node-version: [lts/fermium]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
|||||||
37
base/mp_wait4file.sas
Normal file
37
base/mp_wait4file.sas
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
@file
|
||||||
|
@brief Wait until a file arrives before continuing execution
|
||||||
|
@details Loops with a `sleep()` command until a file arrives or the max wait
|
||||||
|
period expires.
|
||||||
|
|
||||||
|
@example
|
||||||
|
|
||||||
|
Wait 3 minutes OR for /tmp/flag.txt to appear
|
||||||
|
|
||||||
|
%mp_wait4file(/tmp/flag.txt , maxwait=60*3)
|
||||||
|
|
||||||
|
@param [in] file The file to wait for. Must be provided.
|
||||||
|
@param [in] maxwait= (0) Number of seconds to wait. If set to zero, will
|
||||||
|
loop indefinitely (to a maximum of 46 days, per SAS [documentation](
|
||||||
|
https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001418809.htm
|
||||||
|
)). Otherwise, execution will proceed upon sleep expiry.
|
||||||
|
@param [in] interval= (1) The wait period between sleeps, in seconds
|
||||||
|
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
%macro mp_wait4file(file, maxwait=0, interval=1);
|
||||||
|
|
||||||
|
%if %str(&file)=%str() %then %do;
|
||||||
|
%put %str(ERR)OR: file not provided;
|
||||||
|
%end;
|
||||||
|
|
||||||
|
data _null_;
|
||||||
|
maxwait=&maxwait;
|
||||||
|
if maxwait=0 then maxwait=60*60*24*46;
|
||||||
|
do until (fileexist("&file") or slept>maxwait );
|
||||||
|
slept=sum(slept,sleep(&interval,1));
|
||||||
|
end;
|
||||||
|
run;
|
||||||
|
|
||||||
|
%mend mp_wait4file;
|
||||||
2745
package-lock.json
generated
2745
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -33,7 +33,6 @@
|
|||||||
"prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true"
|
"prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sasjs/cli": "^2.38.8",
|
"@sasjs/cli": "^2.39.0"
|
||||||
"all-contributors-cli": "^6.20.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user