Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
truenas-rk3588
truenas
Commits
256e41d2
Commit
256e41d2
authored
2 years ago
by
Waqar Ahmed
Committed by
Waqar Ahmed
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Loop is no longer required for asyncio lock
parent
7378a1fc
base
NAS-119224
NAS-119538-removed
NAS-121347
NAS-123000
NAS-123267
NAS-123516-23.10
NAS-124167
NAS-124388-23.10
NAS-124980-23.10.1
NAS-125227
NAS-125258
NAS-125285
NAS-125301
NAS-125446
NAS-125491-23.10.1
NAS-125499
NAS-125546-23.10.2
NAS-125719
NAS-125816
NAS-125816-backup
NAS-125822
NAS-125830
NAS-125932-24.04
NAS-126857-23.10.2
NAS-126958
NAS-127024-24.04-RC.1
NAS-127087
NAS-127267-24.04-RC.1
NAS-127318
NAS-127422-24.04-RC.1
NAS-127543
NAS-127559-24.04-RC.1
NAS-127702
NAS-127840-24.04.0
NAS-127922-24.04.0
NAS-128040-24.04.0
ad_testing
add-audit-results-cache
add-fstype-check
add-internal-methods
add-more-filesystem-roles
add-nfs4acl-test
add-public-audit
add-realm-validation
add-shadow-fields
add-written-counter
allow-eula-readonly
audit-cache-pagination
awalker_testing
awalker_testing_ad
awalker_testing_mock
beadm-error
bmeagher_testing
bmeagher_testing3
check_create_ancestors
cluster-test
configurable-testing
df_fail_test_012
enhance-sharing-manger-role
expand-api-key-testing
expand-valdiation-smb
expand-verbosity-readonly-role
fail_test_012
failover-test
fix-aclmode-validation
fix-and-improve-audit-query
fix-broken-api-tests
fix-ci-path
fix-haad-test
fix-in-rin-filter_list
fix-smbconf-test
fix-snmp
freeipa-testing
fs-test
gluster-test
improve-alert
improve-audit-query-validation
improve-filterable
improve-initial-install
integration-test-k8s
ldap-improvements
ldap-test
libpam-test
make-ipaddresses-to-register-configurable
master
more_nfs_failover_fixes
mrehan/disable-kubernetes-test
mrehan/fix-ups-tests
new-api
new-jenkins
new-jenkins2
passdb-test
persistent-client-tests
prevent-readonly-web-shell
pristine-cluster
privilege.roles
randomize-privilege-test
reduce-log-spam-quota
refactor-smb
rel-v0.0.1
release/23.10-BETA.1
release/23.10-RC.1
release/23.10.0
release/23.10.0.1
release/23.10.1
release/23.10.1.1
release/23.10.1.2
release/23.10.1.3
release/23.10.2
release/24.04-BETA.1
release/24.04-RC.1
release/24.04.0
remove-json-auth-audit-samba
remove-pool-dataset-permission
roles-test
set-hashes-private
set-iosqe_async-smb-read
setup-ad
smb-proto-tests-refactor
smbaux-testing
soln/rm_enc_swap
sort-enclosures
spaces-tests
stable/cobia
stable/dragonfish
sysdataset-setup-pool-create
test-2fa
test-access
test-acl
test-ad
test-ad-cobia
test-audit
test-audit-changes
test-audit-redaction
test-auth
test-cluster
test-dataset-acl
test-disable-mock
test-freeipa
test-group
test-ldap
test-new-freeipa
test-noauthz
test-rbac
test-refactor-smb
test-refactor-smb2
test-roles
test-runtest-fix
test-shadow
test-share-name
test-sharesec
test-simple-share
test-smb-comments
test-snmp
test-statx
test-syslog
test190-test
test_2fa
test_priv
test_syslog
testing-refine-branchout-process
testing-refine-branchout-process2
use-acl-inheritance-new-dataset
zectl-callerror-stderr
TS-24.04-RC.1
TS-24.04-BETA.1
TS-23.10.2
TS-23.10.1.3
TS-23.10.1.2
TS-23.10.1.1
TS-23.10.1
TS-23.10.0.1
TS-23.10.0
TS-23.10-RC.1
TS-23.10-BETA.1
DN110M-CS-v2.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/middlewared/middlewared/job.py
+3
-4
src/middlewared/middlewared/job.py
with
3 additions
and
4 deletions
+3
-4
src/middlewared/middlewared/job.py
View file @
256e41d2
...
...
@@ -36,12 +36,11 @@ class JobSharedLock(object):
for this lock.
"""
def
__init__
(
self
,
queue
,
name
,
*
,
loop
=
None
):
def
__init__
(
self
,
queue
,
name
):
self
.
queue
=
queue
self
.
name
=
name
self
.
jobs
=
set
()
# Once we upgrade to python 3.10 and it starts crashing here, just revert a commit that introduced `loop=loop`
self
.
lock
=
asyncio
.
Lock
(
loop
=
loop
)
self
.
lock
=
asyncio
.
Lock
()
def
add_job
(
self
,
job
):
self
.
jobs
.
add
(
job
)
...
...
@@ -114,7 +113,7 @@ class JobsQueue(object):
lock
=
self
.
job_locks
.
get
(
name
)
if
lock
is
None
:
lock
=
JobSharedLock
(
self
,
name
,
loop
=
self
.
middleware
.
loop
)
lock
=
JobSharedLock
(
self
,
name
)
self
.
job_locks
[
lock
.
name
]
=
lock
lock
.
add_job
(
job
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help