Propagated hash fix (new management) to api
This commit is contained in:
parent
542d7384d4
commit
c8e0cf2108
|
@ -30,18 +30,10 @@
|
|||
return 127;
|
||||
}
|
||||
|
||||
/* (4) Decrement the hash */
|
||||
$decr = syscall(SOURCE_DIR.'/lib/cyclic-hash/decr');
|
||||
|
||||
if( $decr === false ){
|
||||
slog("cyclic-hash:decr returned $decr EXIT_STATUS", 'api:sync');
|
||||
return 127;
|
||||
}
|
||||
|
||||
/* (5) Generate the multipart boundary */
|
||||
/* (4) Generate the multipart boundary */
|
||||
$boundary = 'boundary--'.hash('sha512', uniqid()).'--boundary';
|
||||
|
||||
/* (6) Fetch data */
|
||||
/* (5) Fetch data */
|
||||
$data = json_decode(syscall(SOURCE_DIR.'/lib/api/fetch'));
|
||||
|
||||
if( is_null($data) ){
|
||||
|
@ -114,6 +106,14 @@
|
|||
|
||||
/* [6] Decrement cyclic-hash so request has ran successfully
|
||||
=========================================================*/
|
||||
/* (1) Decrement the hash */
|
||||
$decr = syscall(SOURCE_DIR.'/lib/cyclic-hash/decr');
|
||||
|
||||
if( $decr === false ){
|
||||
slog("cyclic-hash:decr returned $decr EXIT_STATUS", 'api:sync');
|
||||
return 127;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue