Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
Falcon
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Walter Huang
Falcon
Commits
b134d8b5
Commit
b134d8b5
authored
Jul 03, 2025
by
Lin Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: exit the process
parent
106e9094
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
build.sh
build.sh
+3
-3
index.ts
index.ts
+16
-5
sendNotifySlack.ts
src/detect_section_selector_masters/sendNotifySlack.ts
+0
-2
No files found.
build.sh
View file @
b134d8b5
docker build
-t
reg.i.strikingly.com/falcon:v0.6.4
.
docker build
-t
reg.i.strikingly.com/falcon:v0.6.6
.
docker push reg.i.strikingly.com/falcon:v0.6.4
docker push reg.i.strikingly.com/falcon:v0.6.6
\ No newline at end of file
\ No newline at end of file
index.ts
View file @
b134d8b5
...
@@ -12,7 +12,7 @@ async function main() {
...
@@ -12,7 +12,7 @@ async function main() {
const
shouldRun
=
await
redis
.
get
(
"falcon:should_run_tasks"
);
const
shouldRun
=
await
redis
.
get
(
"falcon:should_run_tasks"
);
if
(
shouldRun
===
"true"
)
{
if
(
true
)
{
task_trigger
=
"should_run_tasks"
;
task_trigger
=
"should_run_tasks"
;
await
redis
.
del
(
"falcon:should_run_tasks"
);
await
redis
.
del
(
"falcon:should_run_tasks"
);
}
else
if
(
isMonday11AM
())
{
}
else
if
(
isMonday11AM
())
{
...
@@ -38,21 +38,25 @@ async function main() {
...
@@ -38,21 +38,25 @@ async function main() {
// 运行 bun run detect
// 运行 bun run detect
console
.
log
(
`[
${
task_trigger
}
] 开始执行 detect`
);
console
.
log
(
`[
${
task_trigger
}
] 开始执行 detect`
);
await
spawn
({
const
detectProcess
=
spawn
({
cmd
:
[
"bun"
,
"run"
,
"detect"
],
cmd
:
[
"bun"
,
"run"
,
"detect"
],
env
,
env
,
stdout
:
"inherit"
,
stdout
:
"inherit"
,
stderr
:
"inherit"
stderr
:
"inherit"
});
});
await
detectProcess
.
exited
;
console
.
log
(
`[
${
task_trigger
}
] detect 执行完成`
);
// 运行 bun run task:gsheet
// 运行 bun run task:gsheet
console
.
log
(
`[
${
task_trigger
}
] 开始执行 task:gsheet`
);
console
.
log
(
`[
${
task_trigger
}
] 开始执行 task:gsheet`
);
await
spawn
({
const
gsheetProcess
=
spawn
({
cmd
:
[
"bun"
,
"run"
,
"task:gsheet"
],
cmd
:
[
"bun"
,
"run"
,
"task:gsheet"
],
env
,
env
,
stdout
:
"inherit"
,
stdout
:
"inherit"
,
stderr
:
"inherit"
stderr
:
"inherit"
});
});
await
gsheetProcess
.
exited
;
console
.
log
(
`[
${
task_trigger
}
] task:gsheet 执行完成`
);
// 延迟执行 task:gsheet:ai 避免 Google Sheet 限流
// 延迟执行 task:gsheet:ai 避免 Google Sheet 限流
const
delayMs
=
parseInt
(
process
.
env
.
GSHEET_AI_DELAY_MS
??
"60000"
,
10
);
const
delayMs
=
parseInt
(
process
.
env
.
GSHEET_AI_DELAY_MS
??
"60000"
,
10
);
...
@@ -61,21 +65,25 @@ async function main() {
...
@@ -61,21 +65,25 @@ async function main() {
// 运行 bun run task:gsheet:ai
// 运行 bun run task:gsheet:ai
console
.
log
(
`[
${
task_trigger
}
] 开始执行 task:gsheet:ai`
);
console
.
log
(
`[
${
task_trigger
}
] 开始执行 task:gsheet:ai`
);
await
spawn
({
const
gsheetAiProcess
=
spawn
({
cmd
:
[
"bun"
,
"run"
,
"task:gsheet:ai"
],
cmd
:
[
"bun"
,
"run"
,
"task:gsheet:ai"
],
env
,
env
,
stdout
:
"inherit"
,
stdout
:
"inherit"
,
stderr
:
"inherit"
stderr
:
"inherit"
});
});
await
gsheetAiProcess
.
exited
;
console
.
log
(
`[
${
task_trigger
}
] task:gsheet:ai 执行完成`
);
// 运行 bun run notify-slack
// 运行 bun run notify-slack
console
.
log
(
`[
${
task_trigger
}
] 开始执行 notify-slack`
);
console
.
log
(
`[
${
task_trigger
}
] 开始执行 notify-slack`
);
await
spawn
({
const
notifySlackProcess
=
spawn
({
cmd
:
[
"bun"
,
"run"
,
"notify-slack"
],
cmd
:
[
"bun"
,
"run"
,
"notify-slack"
],
env
,
env
,
stdout
:
"inherit"
,
stdout
:
"inherit"
,
stderr
:
"inherit"
stderr
:
"inherit"
});
});
await
notifySlackProcess
.
exited
;
console
.
log
(
`[
${
task_trigger
}
] notify-slack 执行完成`
);
if
(
task_trigger
===
"should_run_tasks"
)
{
if
(
task_trigger
===
"should_run_tasks"
)
{
console
.
log
(
`[
${
task_trigger
}
] should_run_tasks 执行完毕,已清理 redis key。`
);
console
.
log
(
`[
${
task_trigger
}
] should_run_tasks 执行完毕,已清理 redis key。`
);
...
@@ -86,6 +94,9 @@ async function main() {
...
@@ -86,6 +94,9 @@ async function main() {
}
}
await
redis
.
quit
();
await
redis
.
quit
();
console
.
log
(
`[
${
task_trigger
}
] 任务执行完毕,退出。`
);
process
.
exit
(
0
);
}
}
function
isMonday11AM
()
{
function
isMonday11AM
()
{
...
...
src/detect_section_selector_masters/sendNotifySlack.ts
View file @
b134d8b5
...
@@ -59,8 +59,6 @@ async function main() {
...
@@ -59,8 +59,6 @@ async function main() {
issue
:
'Inconsistencies are detected in i18n master section template'
,
issue
:
'Inconsistencies are detected in i18n master section template'
,
details
:
`Google Sheet Links:\n- Non-AI selectors:
${
nonAiUrl
}
\n- AI selectors:
${
aiUrl
}
`
details
:
`Google Sheet Links:\n- Non-AI selectors:
${
nonAiUrl
}
\n- AI selectors:
${
aiUrl
}
`
});
});
process
.
exit
(
0
);
}
}
main
().
catch
(
err
=>
{
main
().
catch
(
err
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment