From 1b876028e7727961dbb16160e9b90cf90ea6e9db Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 27 Sep 2020 10:29:49 +0300 Subject: [PATCH] Prep for cron schedule --- app/controllers/api/functions.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 5ba023983d..820cbf3a14 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -262,6 +262,19 @@ App::put('/v1/functions/:functionId') 'timeout' => $timeout, ])); + if ($next) { + ResqueScheduler::enqueueAt($next, 'v1-functions', 'FunctionsV1', [ + + ]); + + // ->setParam('projectId', $project->getId()) + // ->setParam('event', $route->getLabel('event', '')) + // ->setParam('payload', []) + // ->setParam('functionId', null) + // ->setParam('executionId', null) + // ->setParam('trigger', 'event') + } + if (false === $function) { throw new Exception('Failed saving function to DB', 500); }