fix spawn_embed's app and remove where clauses for conflict row

This commit is contained in:
Luna 2019-07-23 16:22:38 -03:00
parent 2086ee2849
commit fa1151c759
3 changed files with 4 additions and 8 deletions

View File

@ -361,10 +361,10 @@ async def msg_add_attachment(message_id: int, channel_id: int,
return attachment_id return attachment_id
async def _spawn_embed(app, payload, **kwargs): async def _spawn_embed(app_, payload, **kwargs):
app.sched.spawn( app_.sched.spawn(
process_url_embed( process_url_embed(
app.config, app.storage, app.dispatcher, app.session, app_.config, app_.storage, app_.dispatcher, app_.session,
payload, **kwargs) payload, **kwargs)
) )

View File

@ -297,10 +297,6 @@ async def _process_overwrites(channel_id: int, overwrites: list):
DO DO
UPDATE UPDATE
SET allow = $5, deny = $6 SET allow = $5, deny = $6
WHERE channel_overwrites.channel_id = $1
AND channel_overwrites.target_type = $2
AND channel_overwrites.target_role = $3
AND channel_overwrites.target_user = $4
""", """,
channel_id, target_type, channel_id, target_type,
target_role, target_user, target_role, target_user,

View File

@ -156,7 +156,7 @@ async def process_url_embed(config, storage, dispatcher,
if not new_embeds: if not new_embeds:
return return
log.debug('made {} thumbnail embeds for mid {}', log.debug('made {} embeds for mid {}',
len(new_embeds), message_id) len(new_embeds), message_id)
await msg_update_embeds(payload, new_embeds, storage, dispatcher) await msg_update_embeds(payload, new_embeds, storage, dispatcher)