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.
Files changed (25) hide show
  1. {missionpanel-1.4.3 → missionpanel-1.5.0}/PKG-INFO +1 -1
  2. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/example/subprocess.py +3 -1
  3. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/handler/handler.py +7 -6
  4. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/PKG-INFO +1 -1
  5. {missionpanel-1.4.3 → missionpanel-1.5.0}/setup.py +1 -1
  6. {missionpanel-1.4.3 → missionpanel-1.5.0}/LICENSE +0 -0
  7. {missionpanel-1.4.3 → missionpanel-1.5.0}/README.md +0 -0
  8. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/__init__.py +0 -0
  9. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/example/__init__.py +0 -0
  10. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/example/rsshub.py +0 -0
  11. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/example/ttrss.py +0 -0
  12. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/handler/__init__.py +0 -0
  13. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/handler/parallal_handler.py +0 -0
  14. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/orm/__init__.py +0 -0
  15. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/orm/core.py +0 -0
  16. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/orm/handler.py +0 -0
  17. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/submitter/__init__.py +0 -0
  18. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/submitter/abc.py +0 -0
  19. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/submitter/asynchronous.py +0 -0
  20. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel/submitter/submitter.py +0 -0
  21. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/SOURCES.txt +0 -0
  22. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/dependency_links.txt +0 -0
  23. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/requires.txt +0 -0
  24. {missionpanel-1.4.3 → missionpanel-1.5.0}/missionpanel.egg-info/top_level.txt +0 -0
  25. {missionpanel-1.4.3 → missionpanel-1.5.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: missionpanel
3
- Version: 1.4.3
3
+ Version: 1.5.0
4
4
  Summary: A mission panel
5
5
  Home-page: https://github.com/yindaheng98/missionpanel
6
6
  Author: yindaheng98
@@ -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
- return (await proc.wait()) == 0
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, case, Select
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
- .group_by(Mission.id)
30
- .having(func.count(
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
- ), 0), else_=None)) <= 0) # get those Missions that have no finished or working Attempt
33
+ )
34
+ ))
35
+ .where(Attempt.id == None)
35
36
  )
36
37
 
37
38
  @staticmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: missionpanel
3
- Version: 1.4.3
3
+ Version: 1.5.0
4
4
  Summary: A mission panel
5
5
  Home-page: https://github.com/yindaheng98/missionpanel
6
6
  Author: yindaheng98
@@ -12,7 +12,7 @@ package_dir = {
12
12
 
13
13
  setup(
14
14
  name='missionpanel',
15
- version='1.4.3',
15
+ version='1.5.0',
16
16
  author='yindaheng98',
17
17
  author_email='yindaheng98@gmail.com',
18
18
  url='https://github.com/yindaheng98/missionpanel',
File without changes
File without changes
File without changes