From d8b4645f2288efa7b06c452077d6fb45bd5f65aa Mon Sep 17 00:00:00 2001 From: Harley <77483822+BigMark824@users.noreply.github.com> Date: Mon, 4 Nov 2024 04:54:20 +1100 Subject: [PATCH 1/4] Add closeAllJobs soapcall --- Rcc/Job.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Rcc/Job.php b/Rcc/Job.php index 711cead..7c1a4d9 100644 --- a/Rcc/Job.php +++ b/Rcc/Job.php @@ -108,4 +108,12 @@ public function closeJob(): array 'jobID' => $this->id ])); } -} \ No newline at end of file + + public function closeAllJobs(): array + { + if(!$this->arbiter) + throw new \Exception('Job has no arbiter associated.'); + + return $this->arbiter->soapCall('CloseAllJobs'); + } +} From 90576a948f8cf1d33ffbf819d310750267de29ca Mon Sep 17 00:00:00 2001 From: Harley <77483822+BigMark824@users.noreply.github.com> Date: Mon, 4 Nov 2024 04:55:14 +1100 Subject: [PATCH 2/4] Add closeAllJobs description to README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ec852f1..334775d 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The Rcc\Job class is the first thing you should be constructing. All functions t - `execute(\Virtubrick\Grid\Rcc\LuaScript $input): array` Executes a script on the job. Returns result from the executed script. - `renewLease(int $expiration): array` Renews the lease on the Job for $expiration amount of seconds. - `closeJob(): array` Closes the job. - +- `closeAllJob(): array` Closes all present jobs. ## Virtubrick\Grid\Rcc\LuaScript Class that allows easy communication for scripts via the Job class. @@ -57,4 +57,4 @@ header('x-asset-dependencies', implode(',', $assetDependencies)); exit(base64_decode($renderB64)); ``` -Copyright 2024 kylegg \ No newline at end of file +Copyright 2024 kylegg From 0278723ac26d4d5c0197ff57df3764691ae41cf6 Mon Sep 17 00:00:00 2001 From: Harley <77483822+BigMark824@users.noreply.github.com> Date: Mon, 4 Nov 2024 04:59:04 +1100 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 334775d..87baa8b 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The Rcc\Job class is the first thing you should be constructing. All functions t - `execute(\Virtubrick\Grid\Rcc\LuaScript $input): array` Executes a script on the job. Returns result from the executed script. - `renewLease(int $expiration): array` Renews the lease on the Job for $expiration amount of seconds. - `closeJob(): array` Closes the job. -- `closeAllJob(): array` Closes all present jobs. +- `closeAllJobs(): array` Closes all present jobs. ## Virtubrick\Grid\Rcc\LuaScript Class that allows easy communication for scripts via the Job class. From 5f56f90d3651ee0a7d5348e5428d395dab581d51 Mon Sep 17 00:00:00 2001 From: Harley <77483822+BigMark824@users.noreply.github.com> Date: Fri, 30 Jan 2026 23:22:26 +1100 Subject: [PATCH 4/4] FIX: Autoloads & move code to src/ directory (following the composer standard) --- .gitignore | 2 +- composer.json | 5 +++++ GridService.php => src/GridService.php | 0 {Rcc => src/Rcc}/Job.php | 0 {Rcc => src/Rcc}/LuaScript.php | 0 {Resources => src/Resources}/RCCService.wsdl | 0 {Traits => src/Traits}/GridSerializerTrait.php | 0 7 files changed, 6 insertions(+), 1 deletion(-) rename GridService.php => src/GridService.php (100%) rename {Rcc => src/Rcc}/Job.php (100%) rename {Rcc => src/Rcc}/LuaScript.php (100%) rename {Resources => src/Resources}/RCCService.wsdl (100%) rename {Traits => src/Traits}/GridSerializerTrait.php (100%) diff --git a/.gitignore b/.gitignore index 57872d0..42cd73d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/vendor/ +/vendor/ \ No newline at end of file diff --git a/composer.json b/composer.json index 68ee2d2..e525f5c 100644 --- a/composer.json +++ b/composer.json @@ -2,6 +2,11 @@ "name": "virtubrick/grid", "description": "Helper library for communicating with the Roblox Grid Service.", "type": "library", + "autoload": { + "psr-4": { + "Virtubrick\\Grid\\": "src/" + } + }, "license": "Apache-2.0", "authors": [ { diff --git a/GridService.php b/src/GridService.php similarity index 100% rename from GridService.php rename to src/GridService.php diff --git a/Rcc/Job.php b/src/Rcc/Job.php similarity index 100% rename from Rcc/Job.php rename to src/Rcc/Job.php diff --git a/Rcc/LuaScript.php b/src/Rcc/LuaScript.php similarity index 100% rename from Rcc/LuaScript.php rename to src/Rcc/LuaScript.php diff --git a/Resources/RCCService.wsdl b/src/Resources/RCCService.wsdl similarity index 100% rename from Resources/RCCService.wsdl rename to src/Resources/RCCService.wsdl diff --git a/Traits/GridSerializerTrait.php b/src/Traits/GridSerializerTrait.php similarity index 100% rename from Traits/GridSerializerTrait.php rename to src/Traits/GridSerializerTrait.php