Fix Walrus API use.
import uuid
from flask_hookserver import Hooks
+from walrus.containers import Hash
from .db import redis
from .members.models import User
@@ -37,7 +38,7 @@ def member(data, guid):
# only if the action is to add a member and if there is repo data
if data.get('action') == 'added' and 'repository' in data:
hook_id = f'project-added-{uuid.uuid4()}'
- hook_hash = redis.Hash.from_dict(hook_id, data)
+ hook_hash = Hash.from_dict(redis, hook_id, data)
hook_hash.expire(60 * 5) # expire the hook hash in 5 minutes
spinach.schedule(update_project_by_hook, hook_id)
return 'Thanks'
