Compare commits

...

11 Commits

11 changed files with 111 additions and 6 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (adbMonitor)" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (adbMonitor)" project-jdk-type="Python SDK" />
</project> </project>

View File

@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" /> <excludeFolder url="file://$MODULE_DIR$/venv" />
</content> </content>
<orderEntry type="jdk" jdkName="Python 3.9 (adbMonitor)" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.11 (adbMonitor)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
</module> </module>

Binary file not shown.

105
cache/record.txt vendored
View File

@ -42,3 +42,108 @@
2023-08-07 10:07:50 2023-08-07 10:07:50
2023-08-07 10:14:39 2023-08-07 10:14:39
2023-08-07 10:20:43 2023-08-07 10:20:43
2023-08-07 10:26:41
2023-08-07 10:31:43
2023-08-07 10:35:44
2023-08-07 10:43:49
2023-08-07 10:49:01
2023-08-07 10:52:46
2023-08-07 10:57:52
2023-08-07 11:02:48
2023-08-07 11:06:53
2023-08-07 11:15:51
2023-08-07 11:26:54
2023-08-07 11:35:01
2023-08-07 11:46:00
2023-08-07 11:50:57
2023-08-07 12:02:20
2023-08-07 12:16:18
2023-08-07 12:24:02
2023-08-07 12:30:02
2023-08-07 12:35:28
2023-08-07 12:40:07
2023-08-07 13:14:49
2023-08-07 13:19:12
2023-08-07 13:24:32
2023-08-07 13:33:21
2023-08-07 13:37:51
2023-08-07 13:55:23
2023-08-07 14:01:47
2023-08-07 14:09:41
2023-08-07 14:14:37
2023-08-07 14:20:34
2023-08-07 14:24:36
2023-08-07 14:28:39
2023-08-07 14:34:43
2023-08-07 14:43:24
2023-08-07 14:50:31
2023-08-07 14:54:31
2023-08-07 15:02:24
2023-08-07 15:11:23
2023-08-07 15:18:28
2023-08-07 15:28:45
2023-08-07 15:39:13
2023-08-07 15:43:42
2023-08-07 15:48:28
2023-08-07 15:53:30
2023-08-07 16:00:33
2023-08-07 16:13:35
2023-08-07 16:18:28
2023-08-07 16:40:54
2023-08-07 16:50:36
2023-08-07 17:08:34
2023-08-07 17:13:55
2023-08-07 17:19:41
2023-08-07 17:24:40
2023-08-07 17:30:41
2023-08-07 17:35:42
2023-08-07 17:40:49
2023-08-07 17:47:42
2023-08-07 18:00:56
2023-08-07 18:06:45
2023-08-07 18:13:54
2023-08-07 18:25:49
2023-08-07 18:31:49
2023-08-07 18:42:55
2023-08-07 18:51:50
2023-08-07 19:02:53
2023-08-07 19:07:55
2023-08-07 19:14:01
2023-08-07 19:20:02
2023-08-07 19:29:56
2023-08-07 19:35:58
2023-08-07 19:48:03
2023-08-08 04:13:43
2023-08-08 04:46:37
2023-08-08 04:52:30
2023-08-08 05:25:53
2022-11-10 05:33:23
2022-11-10 05:34:22
2022-11-10 05:35:17
2022-11-10 05:37:16
2022-11-10 05:38:15
2022-11-10 05:49:33
2022-11-10 05:50:18
2022-11-10 05:51:16
2022-11-10 05:52:18
2022-11-10 05:53:21
2022-11-10 05:56:33
2022-11-10 06:02:22
2022-11-10 06:06:16
2022-11-10 06:09:38
2022-11-10 06:16:16
2022-11-10 06:17:43
2022-11-10 06:23:22
2022-11-10 06:24:37
2022-11-10 06:25:20
2022-11-10 06:26:17
2022-11-10 06:27:30
2022-11-10 06:29:42
2022-11-10 06:34:20
2022-11-10 06:40:21
2022-11-10 06:46:22
2022-11-10 06:48:49
2022-11-10 06:53:20
2023-08-31 17:46:51
2023-09-01 15:41:13
2023-09-01 15:46:10

View File

@ -2,7 +2,7 @@
cache_file_path = cache/record.txt cache_file_path = cache/record.txt
[General] [General]
#timedifference成功拿取任务和现在的时间差大于此时间差重启ProxyMe
time_difference = 1800 time_difference = 1800
[Database] [Database]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -44,7 +44,7 @@ def str_to_timestamp(time_str):
format_str = "%Y-%m-%d %H:%M:%S" format_str = "%Y-%m-%d %H:%M:%S"
try: try:
dt_object = datetime.strptime(time_str,format_str) dt_object = datetime.strptime(time_str,format_str)
timestamp = dt_object.timestamp() timestamp = int(dt_object.timestamp())
return timestamp return timestamp
except ValueError as e: except ValueError as e:
logging.error(f"str_to_timestamp error: {e}") logging.error(f"str_to_timestamp error: {e}")
@ -70,7 +70,7 @@ def monitor(device):
diff_timestamp = now_timestamp - last_line_timestamp diff_timestamp = now_timestamp - last_line_timestamp
print(f"diff_timestamp: {diff_timestamp},与上次成功获取任务时间差{int(diff_timestamp/60)}分钟") print(f"diff_timestamp: {diff_timestamp},与上次成功获取任务时间差{int(diff_timestamp/60)}分钟")
logging.info(f"{device}与上次成功获取任务时间差{int(diff_timestamp/60)}分钟") logging.info(f"{device}与上次成功获取任务时间差{int(diff_timestamp/60)}分钟")
time_difference = modules.read_config.read_time_difference() time_difference = int(modules.read_config.read_time_difference());
if diff_timestamp >= time_difference: if diff_timestamp >= time_difference:
success = modules.command.restart_ProxyMe(device) success = modules.command.restart_ProxyMe(device)
if success: if success: