Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
Harvey
/
job-executor
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 244a1ce6
由
Harvey
编写于
2025-05-12 10:43:27 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
no message
1 个父辈
e75ad428
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
8 行增加
和
3 行删除
build/index.js
build/xxl_job/executor.js
frp/index.js
src/index.ts
src/xxl_job/executor.ts
build/index.js
查看文件 @
244a1ce
...
@@ -11,5 +11,6 @@ app.use(require('body-parser').json());
...
@@ -11,5 +11,6 @@ app.use(require('body-parser').json());
new
(
require
(
"./xxl_job/index"
).
XxlJobExecutor
)(
config
.
xxl_job
,
require
(
'./job'
).
job_handlers
).
applyMiddleware
({
app
,
domain
:
config
.
app_domain
});
new
(
require
(
"./xxl_job/index"
).
XxlJobExecutor
)(
config
.
xxl_job
,
require
(
'./job'
).
job_handlers
).
applyMiddleware
({
app
,
domain
:
config
.
app_domain
});
app
.
listen
(
config
.
port
,
()
=>
{
app
.
listen
(
config
.
port
,
()
=>
{
console
.
log
(
`job-ydn-zq app listening on port
${
config
.
port
}
`
);
console
.
log
(
`job-ydn-zq app listening on port
${
config
.
port
}
`
);
console
.
log
(
`job-ydn-zq app listening on url
${
config
.
app_domain
}
`
);
});
});
//# sourceMappingURL=index.js.map
//# sourceMappingURL=index.js.map
\ No newline at end of file
\ No newline at end of file
build/xxl_job/executor.js
查看文件 @
244a1ce
...
@@ -181,7 +181,9 @@ class Executor {
...
@@ -181,7 +181,9 @@ class Executor {
'XXL-JOB-ACCESS-TOKEN'
:
this
.
accessToken
,
'XXL-JOB-ACCESS-TOKEN'
:
this
.
accessToken
,
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
}
}
}).
then
((
response
)
=>
console
.
log
(
'执行器注册成功:'
,
response
.
data
)).
catch
(
error
=>
console
.
error
(
'执行器注册失败:'
,
error
.
message
));
}).
then
((
response
)
=>
{
// console.log('执行器注册成功:', response.data);
}).
catch
(
error
=>
console
.
error
(
'执行器注册失败:'
,
error
.
message
));
}
}
/**
/**
* 执行器注册摘除:执行器注册摘除时使用,注册摘除后的执行器不参与任务调度与执行
* 执行器注册摘除:执行器注册摘除时使用,注册摘除后的执行器不参与任务调度与执行
...
...
frp/index.js
查看文件 @
244a1ce
...
@@ -3,7 +3,6 @@ const path = require('path');
...
@@ -3,7 +3,6 @@ const path = require('path');
console
.
log
(
'启动 frpc ...'
);
console
.
log
(
'启动 frpc ...'
);
debugger
// 1. 启动 frpc 进程
// 1. 启动 frpc 进程
const
frpc
=
spawn
(
`
${
__dirname
}
/frpc`
,
[
'-c'
,
`
${
__dirname
}
/frpc.toml`
],
{
const
frpc
=
spawn
(
`
${
__dirname
}
/frpc`
,
[
'-c'
,
`
${
__dirname
}
/frpc.toml`
],
{
stdio
:
'inherit'
// 共享输入输出
stdio
:
'inherit'
// 共享输入输出
...
...
src/index.ts
查看文件 @
244a1ce
...
@@ -17,4 +17,5 @@ new (require("./xxl_job/index").XxlJobExecutor)(
...
@@ -17,4 +17,5 @@ new (require("./xxl_job/index").XxlJobExecutor)(
app
.
listen
(
config
.
port
,
()
=>
{
app
.
listen
(
config
.
port
,
()
=>
{
console
.
log
(
`job-ydn-zq app listening on port
${
config
.
port
}
`
)
console
.
log
(
`job-ydn-zq app listening on port
${
config
.
port
}
`
)
console
.
log
(
`job-ydn-zq app listening on url
${
config
.
app_domain
}
`
)
})
})
src/xxl_job/executor.ts
查看文件 @
244a1ce
...
@@ -214,7 +214,9 @@ export class Executor {
...
@@ -214,7 +214,9 @@ export class Executor {
'XXL-JOB-ACCESS-TOKEN'
:
this
.
accessToken
,
'XXL-JOB-ACCESS-TOKEN'
:
this
.
accessToken
,
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
}
}
}).
then
((
response
)
=>
console
.
log
(
'执行器注册成功:'
,
response
.
data
)).
catch
(
error
=>
console
.
error
(
'执行器注册失败:'
,
error
.
message
))
}).
then
((
response
)
=>
{
// console.log('执行器注册成功:', response.data);
}).
catch
(
error
=>
console
.
error
(
'执行器注册失败:'
,
error
.
message
))
}
}
/**
/**
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论