fixed 日志排序按id
This commit is contained in:
parent
3518c510e1
commit
1aea01d55f
|
@ -21,7 +21,7 @@ class LogDAO(MysqlAO):
|
|||
|
||||
async def fetch(self, cond: Any = None, limit: int = 0, start: int = 0) -> List[LogDO]:
|
||||
stmt = select(self._DO_class).order_by(
|
||||
self._DO_class.create_time.desc())
|
||||
self._DO_class.id.desc())
|
||||
if cond is not None:
|
||||
stmt = stmt.where(cond)
|
||||
if limit:
|
||||
|
|
|
@ -128,12 +128,12 @@ async def sync():
|
|||
# if the job status is green, it means we can sync the job
|
||||
if job.status == Color.green:
|
||||
await Log(LogType.INFO,
|
||||
f"The github branch {job.github_branch} from {job.project} is now syncing", job.id)
|
||||
f"The gitlink branch {job.gitlink_branch} from {job.project} is now syncing", job.id)
|
||||
task = asyncio.create_task(sync_job(job))
|
||||
tasks.append(task)
|
||||
else:
|
||||
await Log(LogType.INFO,
|
||||
f"The github branch {job.github_branch} from {job.project} does not need to sync", job.id)
|
||||
f"The gitlink branch {job.gitlink_branch} from {job.project} does not need to sync", job.id)
|
||||
for task in tasks:
|
||||
await task
|
||||
logger.info("End syncing ****************************")
|
||||
|
|
Loading…
Reference in New Issue