Skip to content

Commit

Permalink
Merge pull request #488 from CDLUC3/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jsjiang authored Oct 18, 2023
2 parents 5a01782 + 073353c commit 4617b6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions ezidapp/management/commands/proc-cleanup-async-queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ def run(self):
None
"""
# keep running until terminated
keepRunning = True
while keepRunning:
while not self.terminated():
currentTime=int(time.time())
timeDelta=django.conf.settings.DAEMONS_CHECK_IDENTIFIER_ASYNC_STATUS_TIMESTAMP

Expand Down Expand Up @@ -91,7 +90,6 @@ def run(self):
# mark as 'OK' to delete from the refIdentifier
if not qs:
identifierStatus[key] = True
self.sleep(django.conf.settings.DAEMONS_IDLE_SLEEP)
continue

for task_model in qs:
Expand All @@ -113,8 +111,6 @@ def run(self):
"Delete identifier: " + refId.identifier + " from refIdentifier table.")
self.deleteRecord(self.refIdentifier, refId.pk, record_type='refId', identifier=refId.identifier)

keepRunning=False

self.sleep(django.conf.settings.DAEMONS_BATCH_SLEEP)

def deleteRecord(self, queue, primary_key, record_type=None, identifier=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def handle(self, *_, **opt):
'Scheme must be "ark" or "doi": {}'.format(scheme_str)
)

namespace_str = '{}:{}'.format(scheme_str, full_shoulder.upper())
namespace_str = '{}:{}'.format(scheme_str, full_shoulder)

try:
shoulder_model = ezidapp.models.shoulder.Shoulder.objects.get(prefix=namespace_str)
Expand Down

0 comments on commit 4617b6b

Please sign in to comment.