From de317675a8069b747cb253ba3e2b5dc394ca36ef Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sat, 18 Jul 2026 21:44:51 +0000
Subject: [PATCH] =Base Integrations mainly done - doing a test with setting up the Square integration to follow
---
inc/managers/queue/Queue.php | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/inc/managers/queue/Queue.php b/inc/managers/queue/Queue.php
index 89a8ceb..aee981e 100644
--- a/inc/managers/queue/Queue.php
+++ b/inc/managers/queue/Queue.php
@@ -343,7 +343,7 @@
// Use provided operation_id or generate one
$op->id = !empty($options['operation_id'])
? $options['operation_id']
- : 'u' . $userId . '_' . uniqid('op_');
+ : self::generateID($userId);
$op->type = $type;
$op->userId = $userId;
@@ -404,7 +404,7 @@
private function runQueueOnShutdown(): void
{
- if (!has_action('shutdown', [$this, 'processQueueOnShutdown'])) {
+ if (!has_action('shutdown', [$this, 'processQueueOnShutdown']) && $this->processor->hasAdequateResources()) {
add_action('shutdown', [$this, 'processQueueOnShutdown'], 100);
}
}
@@ -463,4 +463,9 @@
return $response;
}
}
+
+ public static function generateId(int $userID):string
+ {
+ return 'u' . $userID . '_' . uniqid('op_');
+ }
}
--
Gitblit v1.10.0