Skip to content
Snippets Groups Projects
Verified Commit 49f6d754 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

deposit.signals: Remove compatibility code

The deposit service only sends message for the current new deposit loader.
parent 0a9ec2a9
No related branches found
No related tags found
1 merge request!46deposit.loader: Remove no longer used deprecated loader
......@@ -94,25 +94,10 @@ def post_deposit_save(sender, instance, created, raw, using,
elif (instance.status == DEPOSIT_STATUS_VERIFIED and
not instance.load_task_id):
version = default_config.config.get('loader-version', 1)
# schedule deposit loading
if int(version) == 1: # default version
from swh.deposit.config import PRIVATE_GET_RAW_CONTENT
from swh.deposit.config import PRIVATE_GET_DEPOSIT_METADATA
from swh.deposit.config import PRIVATE_PUT_DEPOSIT
archive_url = reverse(PRIVATE_GET_RAW_CONTENT, args=args)
meta_url = reverse(PRIVATE_GET_DEPOSIT_METADATA, args=args)
update_url = reverse(PRIVATE_PUT_DEPOSIT, args=args)
task = create_oneshot_task_dict('load-deposit',
archive_url=archive_url,
deposit_meta_url=meta_url,
deposit_update_url=update_url)
else: # new version
url = utils.origin_url_from(instance)
task = create_oneshot_task_dict(
'load-deposit',
url=url, deposit_id=instance.id)
url = utils.origin_url_from(instance)
task = create_oneshot_task_dict(
'load-deposit',
url=url, deposit_id=instance.id)
load_task_id = schedule_task(default_config.scheduler, task)
instance.load_task_id = load_task_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment