|
@@ -67,26 +67,6 @@ if (!function_exists('sysconf')) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-if (!function_exists('sysqueue')) {
|
|
|
- /**
|
|
|
- * 注册异步处理任务
|
|
|
- * @param string $title 任务名称
|
|
|
- * @param string $command 执行内容
|
|
|
- * @param integer $later 延时执行时间
|
|
|
- * @param array $data 任务附加数据
|
|
|
- * @param integer $rscript 任务多开
|
|
|
- * @return QueueService
|
|
|
- * @throws \think\Exception
|
|
|
- * @throws \think\db\exception\DataNotFoundException
|
|
|
- * @throws \think\db\exception\DbException
|
|
|
- * @throws \think\db\exception\ModelNotFoundException
|
|
|
- */
|
|
|
- function sysqueue($title, $command, $later = 0, $data = [], $rscript = 1)
|
|
|
- {
|
|
|
- return QueueService::instance()->register($title, $command, $later, $data, $rscript);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
if (!function_exists('sysdata')) {
|
|
|
/**
|
|
|
* JSON 数据读取与存储
|
|
@@ -107,16 +87,23 @@ if (!function_exists('sysdata')) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-if (!function_exists('sysoplog')) {
|
|
|
+if (!function_exists('sysqueue')) {
|
|
|
/**
|
|
|
- * 写入系统日志
|
|
|
- * @param string $action 日志行为
|
|
|
- * @param string $content 日志内容
|
|
|
- * @return boolean
|
|
|
+ * 注册异步处理任务
|
|
|
+ * @param string $title 任务名称
|
|
|
+ * @param string $command 执行内容
|
|
|
+ * @param integer $later 延时执行时间
|
|
|
+ * @param array $data 任务附加数据
|
|
|
+ * @param integer $rscript 任务多开
|
|
|
+ * @return QueueService
|
|
|
+ * @throws \think\Exception
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\DbException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
*/
|
|
|
- function sysoplog($action, $content)
|
|
|
+ function sysqueue($title, $command, $later = 0, $data = [], $rscript = 1)
|
|
|
{
|
|
|
- return SystemService::instance()->setOplog($action, $content);
|
|
|
+ return QueueService::instance()->register($title, $command, $later, $data, $rscript);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -133,6 +120,19 @@ if (!function_exists('systoken')) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+if (!function_exists('sysoplog')) {
|
|
|
+ /**
|
|
|
+ * 写入系统日志
|
|
|
+ * @param string $action 日志行为
|
|
|
+ * @param string $content 日志内容
|
|
|
+ * @return boolean
|
|
|
+ */
|
|
|
+ function sysoplog($action, $content)
|
|
|
+ {
|
|
|
+ return SystemService::instance()->setOplog($action, $content);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
if (!function_exists('encode')) {
|
|
|
/**
|
|
|
* 加密 UTF8 字符串
|