missionpanel 1.4.3__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {missionpanel-1.4.3 → missionpanel-1.5.0}/PKG-INFO +1 -1
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/example/subprocess.py +3 -1
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/handler/handler.py +7 -6
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/PKG-INFO +1 -1
- {missionpanel-1.4.3 → missionpanel-1.5.0}/setup.py +1 -1
- {missionpanel-1.4.3 → missionpanel-1.5.0}/LICENSE +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/README.md +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/__init__.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/example/__init__.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/example/rsshub.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/example/ttrss.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/handler/__init__.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/handler/parallal_handler.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/orm/__init__.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/orm/core.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/orm/handler.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/submitter/__init__.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/submitter/abc.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/submitter/asynchronous.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/submitter/submitter.py +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/SOURCES.txt +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/dependency_links.txt +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/requires.txt +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/top_level.txt +0 -0
- {missionpanel-1.4.3 → missionpanel-1.5.0}/setup.cfg +0 -0
@@ -38,4 +38,6 @@ class SubprocessAsyncHandlerInterface(AsyncHandler, abc.ABC):
|
|
38
38
|
stdout=asyncio.subprocess.PIPE,
|
39
39
|
stderr=asyncio.subprocess.PIPE)
|
40
40
|
await asyncio.gather(self.__readline_info(proc.stdout), self.__readline_debug(proc.stderr))
|
41
|
-
|
41
|
+
return_code = await proc.wait()
|
42
|
+
self.getLogger().info('return | %d' % return_code)
|
43
|
+
return return_code == 0
|
@@ -5,7 +5,7 @@ from typing import List, Optional, Tuple, Union
|
|
5
5
|
from sqlalchemy.orm import Session, Query
|
6
6
|
from sqlalchemy.ext.asyncio import AsyncSession
|
7
7
|
from missionpanel.orm import Mission, Tag, MissionTag, Attempt
|
8
|
-
from sqlalchemy import select, func, distinct,
|
8
|
+
from sqlalchemy import select, func, distinct, Select, cast, Text
|
9
9
|
|
10
10
|
|
11
11
|
class HandlerInterface(abc.ABC):
|
@@ -25,13 +25,14 @@ class HandlerInterface(abc.ABC):
|
|
25
25
|
def query_todo_missions(tags: List[str]) -> Select[Tuple[Mission]]:
|
26
26
|
return (
|
27
27
|
HandlerInterface.query_missions_by_tag(tags)
|
28
|
-
.outerjoin(Attempt
|
29
|
-
|
30
|
-
|
31
|
-
case((( # see if Attempt is finished or working on the Mission
|
28
|
+
.outerjoin(Attempt, onclause=(
|
29
|
+
(cast(Attempt.content, Text) == cast(Mission.content, Text)) & (
|
30
|
+
# see if Attempt is finished or working on the Mission
|
32
31
|
Attempt.success.is_(True) | # have finished handler
|
33
32
|
(Attempt.last_update_time + Attempt.max_time_interval >= datetime.datetime.now()) # have working handler
|
34
|
-
)
|
33
|
+
)
|
34
|
+
))
|
35
|
+
.where(Attempt.id == None)
|
35
36
|
)
|
36
37
|
|
37
38
|
@staticmethod
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|