Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
job-pattern-rule-evaluation-wip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PathoJobs
job-pattern-rule-evaluation-wip
Commits
9efb16d6
Commit
9efb16d6
authored
4 months ago
by
Alex Wiens
Browse files
Options
Downloads
Patches
Plain Diff
Prule.daemon: Fix InvalidStateError in future
parent
0cbe3ee2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
prule/daemon/__main__.py
+7
-4
7 additions, 4 deletions
prule/daemon/__main__.py
with
7 additions
and
4 deletions
prule/daemon/__main__.py
+
7
−
4
View file @
9efb16d6
...
...
@@ -379,7 +379,10 @@ class CCCheckThread(threading.Thread):
return
None
#await self.requestTask
try
:
jobs
=
self
.
requestFuture
.
result
()
except
CancelledError
as
e
:
jobs
=
None
with
self
.
stopCondition
:
self
.
requestTask
=
None
self
.
requestFuture
=
None
...
...
@@ -489,9 +492,9 @@ class CCCheckThread(threading.Thread):
with
self
.
stopCondition
:
print
(
"
Stop CCCheckThread
"
)
self
.
stopThread
=
True
if
self
.
requestFuture
!=
None
:
#
self.requestFuture.cancel()
self
.
requestFuture
.
set_result
(
None
)
if
self
.
requestFuture
!=
None
and
self
.
requestFuture
.
done
()
==
False
:
self
.
requestFuture
.
cancel
()
#
self.requestFuture.set_result(None)
self
.
stopCondition
.
notify
()
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment