From b63fcabd50b64298a3ca65cc4bdb2a457b13f84e Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 16 Sep 2023 21:09:19 +0300 Subject: [PATCH] fix push api connection, define common memory timeout --- src/crontab/export/push.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/crontab/export/push.php b/src/crontab/export/push.php index 288d6e7..7e6de19 100644 --- a/src/crontab/export/push.php +++ b/src/crontab/export/push.php @@ -434,7 +434,13 @@ if (API_EXPORT_PUSH_ENABLED) // Send push request $debug['dump'][$manifest->import->push]['request'] = $request; - $curl = new Curl($manifest->import->push, API_USER_AGENT, $request); + $curl = new Curl( + $manifest->import->push, + API_USER_AGENT, + [ + 'data' => json_encode($request) + ] + ); $debug['http']['total']++; @@ -463,7 +469,7 @@ if (API_EXPORT_PUSH_ENABLED) } // Update memory pool - $memory->set('api.export.push', $memoryApiExportPush); + $memory->set('api.export.push', $memoryApiExportPush, 3600); } // Export push disabled, free api.export.push pool