Skip to content

Commit

Permalink
修复 Task 执行
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Mar 2, 2025
1 parent 1027c14 commit 3a6d9a3
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 20 deletions.
11 changes: 6 additions & 5 deletions RELEASE_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@

### GUI

-/-
- 修复了定时任务只执行两次的 BUG
- 修复了检查更新
- 修复异步导致的自启动隧道异常 #175 #225

### CLI

-/-

### Core

- 规范 UA
- 更新到 LoCyanFrp 0.51.3-9
- 修复了意外修改 `baseOptions` 的 BUG

## 版本信息

- nyalcf_gui: 1.0.1
- nyalcf_gui: 1.0.2
- nyalcf_cli: 1.0.1
- nyalcf_env: 2.0.0
- nyalcf_core: 2.0.3
- nyalcf_core: 2.0.4
- nyalcf_inject: 2.0.0

<!-- Some change log here -->
2 changes: 1 addition & 1 deletion nyalcf_cli/nyalcf_core_extend/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ packages:
path: "../../nyalcf_core"
relative: true
source: path
version: "2.0.2"
version: "2.0.4"
nyalcf_env:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion nyalcf_cli/nyalcf_core_extend/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf_core_extend
description: "Nya LoCyanFrp! core extend module."
version: 2.0.3
version: 2.0.4
homepage: https://nyalcf.1l1.icu
publish_to: none

Expand Down
4 changes: 2 additions & 2 deletions nyalcf_cli/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,14 @@ packages:
path: "../nyalcf_core"
relative: true
source: path
version: "2.0.2"
version: "2.0.4"
nyalcf_core_extend:
dependency: "direct main"
description:
path: nyalcf_core_extend
relative: true
source: path
version: "2.0.3"
version: "2.0.4"
nyalcf_env:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion nyalcf_cli/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf
description: "[CLI]The next generation of LoCyanFrp launcher."
version: 1.0.1+4
version: 1.0.2+1
homepage: https://nyalcf.1l1.icu
publish_to: none
# repository: https://github.com/my_org/my_repo
Expand Down
2 changes: 1 addition & 1 deletion nyalcf_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf_core
description: 'Nya LoCyanFrp! core module.'
version: 2.0.2
version: 2.0.4
homepage: https://nyalcf.1l1.icu
publish_to: none
# repository: https://github.com/my_org/my_repo
Expand Down
11 changes: 7 additions & 4 deletions nyalcf_gui/nyalcf_core_extend/lib/utils/task_scheduler.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Package imports:
import 'package:nyalcf_core/storages/configurations/launcher_configuration_storage.dart';
import 'package:nyalcf_core/utils/logger.dart';
import 'package:nyalcf_env/nyalcf_env.dart';

// Project imports:
Expand All @@ -12,16 +13,18 @@ class TaskScheduler {
static final _lcs = LauncherConfigurationStorage();

static Future<void> start() async {
Logger.debug("Starting tasks schedule...");
if (ENV_GUI_DISABLE_AUTO_UPDATE_CHECK ?? false) _taskUpdater();
_taskAutoSign();
_taskUpdateProxiesList();
_taskRefreshAccessToken();
Logger.debug("Tasks started.");
}

static _taskUpdater() async {
TaskUpdater().startUp(
callback: () => Future.delayed(const Duration(hours: 1), () {
TaskUpdater().startUp();
_taskUpdater();
}),
);
}
Expand All @@ -30,7 +33,7 @@ class TaskScheduler {
if (_lcs.getAutoSign()) {
TaskAutoSign().startUp(
callback: () => Future.delayed(const Duration(hours: 12), () {
TaskAutoSign().startUp();
_taskAutoSign();
}),
);
}
Expand All @@ -39,7 +42,7 @@ class TaskScheduler {
static _taskRefreshAccessToken() async {
TaskRefreshAccessToken().startUp(
callback: () => Future.delayed(const Duration(minutes: 30), () {
TaskUpdater().startUp();
_taskRefreshAccessToken();
}),
);
}
Expand All @@ -48,7 +51,7 @@ class TaskScheduler {
if (_lcs.getAutoSign()) {
TaskUpdateProxiesList().startUp(
callback: () => Future.delayed(const Duration(minutes: 15), () {
TaskUpdateProxiesList().startUp();
_taskUpdateProxiesList();
}),
);
}
Expand Down
2 changes: 1 addition & 1 deletion nyalcf_gui/nyalcf_core_extend/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ packages:
path: "../../nyalcf_core"
relative: true
source: path
version: "2.0.2"
version: "2.0.4"
nyalcf_env:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion nyalcf_gui/nyalcf_core_extend/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf_core_extend
description: "Nya LoCyanFrp! core extend module."
version: 2.0.3
version: 2.0.4
homepage: https://nyalcf.1l1.icu
publish_to: none

Expand Down
4 changes: 2 additions & 2 deletions nyalcf_gui/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,14 @@ packages:
path: "../nyalcf_core"
relative: true
source: path
version: "2.0.2"
version: "2.0.4"
nyalcf_core_extend:
dependency: "direct main"
description:
path: nyalcf_core_extend
relative: true
source: path
version: "2.0.3"
version: "2.0.4"
nyalcf_env:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion nyalcf_gui/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nyalcf
description: "[GUI]The next generation of LoCyanFrp launcher."
version: 1.0.1+4
version: 1.0.2+1
homepage: https://nyalcf.1l1.icu
publish_to: 'none'

Expand Down

0 comments on commit 3a6d9a3

Please sign in to comment.